duetds / date-picker

Duet Date Picker is an open source version of Duet Design System’s accessible date picker. Try live example at https://duetds.github.io/date-picker/
https://www.duetds.com
MIT License
1.73k stars 68 forks source link

Ability to highlight dates within a date range #61

Open nickyblissAviva opened 3 years ago

nickyblissAviva commented 3 years ago

Is your feature request related to a problem? Please describe. When using the date-picker for a date range it would be useful if the range of dates that has/is being selected could be highlighted visually, providing the user feedback as to the range they have selected.

Describe the solution you'd like Additional class added to dates within a set range to enable highlighting of the dates within the range that has been selected by the user. Similar to https://pikaday.com/examples/date-range.html

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

ashleyfigure commented 2 years ago

Was there any solution offered for this issue? I'd like to same functionality

samuel-clara commented 2 years ago

I would also love a solution for this

jonnystening commented 2 years ago

It's possible to hook up two date pickers via min and max so they restrict available dates and provide a range selection.

This approach of using separate from and to date fields is likely a more accessible solution than trying to combine in one single date field/calendar.

See https://gel.westpacgroup.com.au/design-system/components/date-picker?b=WBC#date-range for reference

samuel-clara commented 2 years ago

Thank you for your answer. Is it a way to style the selected date range once selected from the two date pickers?

WickyNilliams commented 5 months ago

Hey, I'm the original author of this project. I've made a spiritual successor to duet here. It's not a full date picker, just the calender components (there's a guide in the docs on how to create a full picker). It has full support for date ranges, as well as displaying multiple months at once https://github.com/WickyNilliams/cally