WickyNilliams / cally

Small, feature-rich calendar components
https://wicky.nillia.ms/cally/
MIT License
1.06k stars 12 forks source link

Support for TimePicker #32

Closed collegeimprovements closed 2 months ago

collegeimprovements commented 2 months ago

Thanks a lot for this library, it solves a lot of our issues. Would it be possible to have a time-picker support as well ?

<input type="datetime-local" id="meeting-time" name="meeting-time" value="2024-06-12T19:30" min="2024-06-07T00:00" max="2024-06-14T00:00" />

Screenshot 2024-04-20 at 10 47 30 PM

Essentially something like this which is supported in HTML out of the box. If possible stepper function it time for 5 or 15 mins would be great too.

WickyNilliams commented 2 months ago

I personally think time picker is too open-ended of a UI component. It doesn't feel "settled" what constitutes a time picker, meaning people will have different ideas how it should work/look - should it be a set of text inputs, a <select>, a bunch of toggle buttons, a spinner? Whereas date pickers tend to be quite uniform

For that reason, I won't be doing this. At least for now.

Here's an example of building one yourself in case it's useful https://codepen.io/WickyNilliams/pen/LYvqKwa?editors=1010