Disable different weekdays in multiple date ranges
- Lingua principale
- JavaScript
- Stelle
- 7.6k
- Fork
- 981
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Hi! I have been looking around for quite some time now, but I can't seem to find an answer. Is it possible to disable different disabled weekdays for different date ranges? I am building a booking form where it's possible to have multiple date ranges where a product will be available on different days. Something like this:
Range1: 01.01.2018 - 31.12.2018: Mon, Tue, Fri
Range2: 01.01.2019 - 31.12.2020: Wed, Fri, Sun
Range3: 01.01.2020 - 05.02.2020: Sat
I know that it's possible to calculate an array of all available/disabled days, but that would be quite the long list and I'm not sure about performance implications (there may be ten date pickers on the page). The available ranges can be anywhere from a few days to a few months with most products having around three to five ranges.
Unfortunately I can't really post working code, since the picker is wrapped in a React component and calculates the available dates. It's a default picker though, nothing fancy. Any help would be appreciated!
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.