Show only specific dates and ability to show recurring dates #1965
Replies: 2 comments 4 replies
-
Hi @sujit-baniya thanks for your suggestions1
Curious to see your code. // Suppose `daysToShow` is the array of the days you want to display:
<DayPicker hidden={ date => { return !daysToShow.includes(date); } } />
Same as above, you can use a function: // Will hide all Sun for every week;
<DayPicker hidden={ date => { return date.getDay() === 0; } } /> |
Beta Was this translation helpful? Give feedback.
-
Hi @gpbl - can you hide weekends? So on the calendar, the user will only be able to see Mon-Fri |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It would be less code on developer's side to just show the specific dates and hiding others. Currently I could use
hidden
to hide all non-essential dates but that would get a lot date ranges to hide.So a property like
show: [2023-01-01]
would be good to show only that date hiding other datesI could select recurring day per week or dates per month and every other dates would be hidden/disabled.
For e.g.
Weekly Sun, Tue Wed
would allow me to only show Sun Tue and Wed for every weekBeta Was this translation helpful? Give feedback.
All reactions