panel
panel copied to clipboard
Hide time in DatetimeRangePicker widget if enable_time is false?
The DatetimeRangePicker
widget can be used as a date range picker if enable_time
is False.
In this case it may be better to change the string format in the value field so that instead of the full datetime, you would simply see "2022-01-01 to 2022-01-02" as the time is not relevant in this context. It can also be confusing to display the time while it cannot be changed in the browser.
Sorry I did not know there was an open PR for a DateRangePicker. This issue may therefore be ignored.
If a dedicated date range picker widget exists, the "enable_time" option in DatetimeRangePicker could become obsolete.
I will close this issue when #2804 is merged. If it's decided that it's not the way to go, there could be a discussion on how to make DatetimeRangePicker more suitable for picking dates.
I think it would indeed be nicer to have a DateRangePicker
widget, to complete the series of the date/time widgets which makes them more easily discoverable.