Reputation: 21
I'm using react-big-calendar for calendar purpose.
Now I want to disable a particular day, i.e., If Monday is holiday or something, the user can not select any event on that day.
For that I want to disable the whole day, Because of that reason, the user can't select any timeslot.
Thanks in advance
Upvotes: 2
Views: 4738
Reputation: 11
To correctly hide day in react-big-calendar, you'll need to modify the views and handle the logic for hiding weekends more effectively. You can use a custom views property to filter out specific days.
Upvotes: 1
Reputation: 5442
First thing I would do is tap into your dayPropGetter
to apply some sort of class or style, showing the user if that date is unavailable. The next thing I would do is tap into your onSelectSlot
to check the start/end dates on selection, and just return 'false' from the method if it's outside your acceptance boundaries.
Upvotes: 4