Disable dates, but not the navigation
I have a requirement where I need to disable a date range but still have the arrow navigation functional, is this possible?
Absolutely. Use pass a function that returns true for dates that are meant to be disabled to tileDisabled.
Awesome, thanks! So I've got the disabled dates working, but I can no longer navigate by year using the arrows in the navigation if my available dates are within a year. Is there any way to un-disable the arrow navigation, or have it remain active regardless of what is disabled/available?
Hmmm, not sure what you got 🤔
- Tiles disabled using
tileDisabledwill not disable any navigation - Tiles disabled using
minDate,maxDatewill
So I am currently using both tileDisabled and minDate/maxDate. I use tileDisabled to suspend slots which have already been booked, and minDate/maxDate to restrict the range which the user can be chosen from.
The problem I have is if I have a date range from 01/02/2020 to 31/01/2021 the user is restricted to navigating by month rather than being able to navigate by a whole year. Is there an option to have the navigation active at all times?
Thank you for all your hard work on this, love the component!
Thanks for the kind words. Unfortunately Navigation blocks navigating to any view which doesn't contain a single enabled tile (enabled = not limited by min/max date).
First all, thanks for this great component @wojtekmaj .
I have comment to make on this thread. I am trying to use this component somewhat like @brett-chisholm establishing a range of valid dates and likewise I use tileDisabled to disable invalid slots.
My comment would be, given a mindate and maxdate, tileDisabled seems to be run on dates out of this range and do it on displaying and on hiding.
tileDisabled runs on all tiles that are being rendered, same as tileClassName and tileContent.