Skip to content
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

Closed
Anithacld opened this issue Apr 19, 2016 · 11 comments
Closed

Enable and Disable cells for specific dates in fullcalendar #3125

Anithacld opened this issue Apr 19, 2016 · 11 comments

Comments

@Anithacld
Copy link

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.

@arshaw
Copy link
Member

arshaw commented Apr 22, 2016

http://fullcalendar.io/docs/event_rendering/Background_Events/
http://fullcalendar.io/docs/event_ui/eventOverlap/

@arshaw arshaw closed this as completed Apr 22, 2016
@ATouhou
Copy link

ATouhou commented Aug 28, 2016

Hey Anithacid did you complete what you were making?

@urmamb
Copy link

urmamb commented May 3, 2018

If selectable is set to true, Background_events are still selectable.

@santoscarlo
Copy link

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

@Damercy
Copy link

Damercy commented Aug 17, 2020

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 validRange object property to specify those dates that will not be disabled (which just means that the dates that are invalid will be disabled). Check this out!

Hope this helps! 👍

@erikkubica
Copy link

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 validRange object property to specify those dates that will not be disabled (which just means that the dates that are invalid will be disabled). Check this out!

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.

@AnkitSemwal007
Copy link

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

did you have find how to disable dateClick for particular date like you were saying when slots are full that date will be disable

@techwebdev
Copy link

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

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 ?

@zahoor-avion
Copy link

is there any solution for this problem...?
i also need to display only some unique multiple dates on calendar and hide/disable all other dates.
like to show availability for dates some specific dates Aug-1,Aug-3, Aug-6, Aug-8.

is this feature available in premium version ..?

@DanB-dev
Copy link

DanB-dev commented Aug 30, 2022

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.

@prasath0908
Copy link

Venthu thaninthathu kadu.... full calenderku vanakatha podu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests