Datepicker: set minute step in time selection

Hi anvil community !

What I’m trying to do:

In the time selection of a datepicker component, instead of having a 1minute step, I would like to be able to set it myself (for instance every 15 minutes).

What I’ve tried and what’s not working:

Since i couldn’t find how to implement it, i used the datepicker for date selection only, and a dropdown menu for time selection (with items going from 00:00 to 23:45).
Here is what it looks like :

It works, but it is so much more work… especially for a booking app with many… many date(time)pickers to work with…
Hence i was wondering if someone has already built a datepicker with a parameterizable time selection.

Any one with a solution ???

I haven’t made what you’re asking for, but it would be super simple for you to make it as a custom component with date and time properties or a date-time property.

5 Likes

I knew about custom components from forms, but didn’t think of using it…
Not THE solution, but will definitely give it a try.

But still… in my opinion, a “time_step” property in the datepicker component should be a thing…

1 Like