TimePicker intervals #1842
-
Hi, I am looking to use the TimePicker component in one of our services. The requirement we have is to picker a time that falls into a 5 minute interval, for example 11:05, 11:10, 11:!5 etc. Looking at the documentation I can't see a way to restrict the time picker to 5 minutes rather than 1 minute. Is there a way to do this? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @StevenJacksonZuto! Sorry for the delay in responding to this Discussion. The Paste TimePicker is built on top of the HTML native Time Picker element, which does have a We do plan on updating the Time Picker component in the future to not rely on the HTML element, so when that comes, we'll consider enabling an interval prop. It's great to know that you have a use case for this. Hope this helps! |
Beta Was this translation helpful? Give feedback.
Hi @StevenJacksonZuto! Sorry for the delay in responding to this Discussion.
The Paste TimePicker is built on top of the HTML native Time Picker element, which does have a
step
attribute used for this purpose. However, the interval experience differs greatly across browsers, so we made the decision to keep things consistent for our users and stick to one-minute intervals.We do plan on updating the Time Picker component in the future to not rely on the HTML element, so when that comes, we'll consider enabling an interval prop. It's great to know that you have a use case for this.
Hope this helps!