-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable and Disable cells for specific dates in fullcalendar #3125
Comments
Hey Anithacid did you complete what you were making? |
If |
how can i integrate to disable a date cell in full calendar. when reach the limit of the appointment. example the appoinmeny number is 5 when slot is accomodate. the date cell is turn into disable. thanks a lot |
I know this issue is closed but since nobody seems to have answered concretely, I'm commenting a solution I found on the fullcalendar docs. Seems like we need to use Hope this helps! 👍 |
@Damercy this is not corrent naswer. validRange allows to select dates only in range of continuous dates. for example from X to Y. But it cannot block dates selectively, ex.: April 1., February 5 are not allowed but anything else is. |
did you have find how to disable dateClick for particular date like you were saying when slots are full that date will be disable |
any solution ? |
is there any solution for this problem...? is this feature available in premium version ..? |
Hi, I'm not sure how much this helps you but inside of my Next.js + Typescript Calendar I'm using this function to check if the date is between two dates. const checkForBreak = (
selectInfo: DateSelectArg,
handleShow: (addEvent: string, selectInfo?: DateSelectArg) => void
) => {
const daysAfter = new Date(
selectInfo.end.getFullYear(),
selectInfo.end.getMonth(),
selectInfo.end.getDate() - 1
);
const daysBefore = new Date(
selectInfo.start.getFullYear(),
selectInfo.start.getMonth(),
selectInfo.start.getDate() + 1
);
if (daysBefore < new Date('2022-08-05') || daysAfter > new Date('2022-08-10'))
handleShow('addEvent', selectInfo);
}; I'm then Defining an event that matched those dates and using that as the visual indicator the days aren't choosable. {
id: createEventId(), //Function to generate an auto_incremented Id.
title: 'Break',
start: '2022-08-05',
end: '2022-08-11',
constraint: {
start: '2022-08-05',
end: '2022-08-11',
},
overlap: false,
color: '#257e4a',
extendedProps: {
content: 'Break',
},
}, To be clear this is my first attempt at this and I'm very new to the fullCalendar docs so this may be really dumb, but it does work. |
Venthu thaninthathu kadu.... full calenderku vanakatha podu |
Hi,
I need to enable and disable cells for specific dates in resource view. Means i want to enable or disable cells depending upon my resource availability.
If my resource available, i want to enable and create event.
If my resource not available, i should disable click option and also need to change background color to identify its disabled.
Kindly provide me the solution to do above mentioned. Thanks in advance.
The text was updated successfully, but these errors were encountered: