How to paint a range div without using range mode? #2728
Replies: 2 comments 6 replies
-
@gpbl any ideas? |
Beta Was this translation helpful? Give feedback.
-
@berkerdemirer, is there a reason why you couldn't use As @rodgobbi is suggesting, an alternative is to use modifiers to match specific days (or the range of days in between). You can "style" days matching modifiers applying your own CSS classes: https://daypicker.dev/guides/custom-modifiers#styling-modifiers To define range modifiers, DayPicker provides utilities like rangeIncludesDate or rangeContainsModifiers - but I'm not sure how much more difficult this way is than using The use case of two inputs with a range selection is indeed interesting - it would be nice to add an example in our docs. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have two date pickers in my form, one for selecting a departure date and the other one is selecting for return date. Since I need to use two input fields and submit these values separately, I am using day picker in a single mode with
numberOfMonths=2
. However, by our design, if user selects both dates then I should be showing a range between the two dates.For example, in the images, if I am checking on the return date then I should be seeing the range between the departure date.
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions