If the start and end date are the same, it'd be great to have the option only show that date rather than the range.
Eg rather than showing 01/07/22 - 01/07/22, just 01/07/22 would look much neater in a lot of contexts 😎
This would be like the display when maxDays is set to one, but with users still able to select a larger range if they want to.
Context
We have a date picker which defaults to a single day selection, but users can select up to 7 days.
Alternatives
It's probably possible to hack something similar either by comparing dates outside the picker and setting the input value directly, or doing something hacky with the 'format' option, but it'd be much cleaner (and less error prone) to handle this directly inside the picker.
Would be very happy to hear any existing solutions if I've overlooked something 🪄
If the start and end date are the same, it'd be great to have the option only show that date rather than the range.
Eg rather than showing
01/07/22 - 01/07/22
, just01/07/22
would look much neater in a lot of contexts 😎This would be like the display when
maxDays
is set to one, but with users still able to select a larger range if they want to.Context
We have a date picker which defaults to a single day selection, but users can select up to 7 days.
Alternatives
It's probably possible to hack something similar either by comparing dates outside the picker and setting the input value directly, or doing something hacky with the 'format' option, but it'd be much cleaner (and less error prone) to handle this directly inside the picker.
Would be very happy to hear any existing solutions if I've overlooked something 🪄