Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default selected time is outside of the enabled range #30

Open
georgebutter opened this issue Jul 19, 2023 · 1 comment
Open

Default selected time is outside of the enabled range #30

georgebutter opened this issue Jul 19, 2023 · 1 comment

Comments

@georgebutter
Copy link

georgebutter commented Jul 19, 2023

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.

@Feshchenko
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants