wave icon indicating copy to clipboard operation
wave copied to clipboard

Datetime picker

Open aranvir opened this issue 2 years ago • 5 comments

Is your feature request related to a problem? Please describe

I'd like users to specify a time range by defining two datetimes. The beginning of the time range cannot lie in the past and the end (obviously) must be later than the beginning. Currently, if a minimum time for the time picker is specified this limits the time for all days even those in the future that would specify a valid end time.

Describe the solution you'd like

Currently, separate date and time pickers are available. A combined datetime picker has been suggested before here: https://github.com/h2oai/wave/issues/1537. My motivation for the request is different then for that issue which is why I created a new one.

I'd like either a combined datetime picker that takes a min and max limit as datetime. Alternatively, my problem would be solved if the time picker takes a datetime or timestamp as limit (but that does not seem like a good solution).

Describe alternatives you've considered

The alternative for my use case would be to remove min/max limiters and add a validation step that prevents form submission for invalid start/stop inputs. But UI limitation would be easier to use.

Additional context

None

aranvir avatar May 31 '23 12:05 aranvir

Is your feature request the same as https://github.com/h2oai/wave/issues/1012?

mturoci avatar May 31 '23 12:05 mturoci

I would also need time specification, not just date range

aranvir avatar May 31 '23 13:05 aranvir

I see. Can you point to some real-world web apps that would use such range picker that supports both dates and times? IIRC, I have always only saw date range pickers and the time was then picked separately.

mturoci avatar May 31 '23 14:05 mturoci

I don't have an example. I kind of thought I had seen something like this on booking pages for trains and flights but if I look for it now it is indeed separate pickers.

I did not think it was such a niche use case :sweat_smile: but maybe it is.

Anyway, I thought I'd request it as a nice-to-have and maybe it would be also useful for others. For now, I "solved" it for my use-case by adding the validation step.

aranvir avatar May 31 '23 14:05 aranvir

Gotcha, sounds reasonable. Will leave this open for now. Since the component would be fairly complex, I will backseat it for now, but happy to accept community PRs in case of interest.

mturoci avatar May 31 '23 14:05 mturoci