palantir / blueprint

A React-based UI toolkit for the web
https://blueprintjs.com/
Apache License 2.0
20.51k stars 2.15k forks source link

"Allow single day range" not respected if using end time picker before selecting date #6856

Open evansjohnson opened 1 week ago

evansjohnson commented 1 week ago

Screenshot 2024-06-24 at 8 30 34 AM

Steps to reproduce

When fixing https://github.com/palantir/blueprint/issues/6483 this will likely become the behavior for any date, not just selecting today's date, since using the selected start date as a default for the end date when selecting a time is likely more applicable.

Actual behavior

If selecting today's date, modifying the time of the end date causes the date range to be a single day, even if the allowSingleDayRange prop is true.

Expected behavior

Should not be able to select an end date equal to the start date when allowSingleDayRange is not true.

Possible solution

Add one day to the default value when allowSingleDayRange is not true.