datepicker icon indicating copy to clipboard operation
datepicker copied to clipboard

Default selected time is outside of the enabled range

Open georgebutter opened this issue 1 year ago • 1 comments

I have set the configutation of times to start at 8:00, but when selecting a date it defaults to 0:00. Would it be more intuitive to set it to the first enabled time?

If this is out of the scope of the project, what would be the right way to set it with the existing hooks?

On a side note, perhaps I should raise a separate issue, but it would be handy to be able to provide an array of time ranges so that times in the middle of the range can also be disabled.

georgebutter avatar Jul 19 '23 08:07 georgebutter

@georgebutter, thanks for submitting this. The idea of defaulting time to the first available is good. I will think about how to do it. To keep time in the view each time has now option so you can add a marker to time and scroll the view with any library, this one is good https://www.npmjs.com/package/scroll-into-view-if-needed You can hide all disabled time, then first available will be in the view.

Feshchenko avatar Jul 31 '23 21:07 Feshchenko