Auto set minutes to 00 when an hour is set with native TimePicker

I've got this TimePicker:
TimePicker::make('start_time')
->seconds(false)
TimePicker::make('start_time')
->seconds(false)
I noticed that the state is only updated when the user types an hour AND minutes. I would like to interact with it using Alpine to set minutes to 00 in real time when the user types an hour. But I don't know how to do that since nothing seems to be triggered when minutes are absent.
Solution:
According to this SO comment, this is not possible because the field doesn't even have a value when it's partially filled. https://stackoverflow.com/a/58669146...
Jump to solution
3 Replies
toeknee
toeknee3w ago
Use a default value? say ->default(now()) ?
charlie
charlieOP3w ago
that's an idea, but that doesn't fit my needs. (that's a form for members to submit events)
Solution
charlie
charlie3w ago
According to this SO comment, this is not possible because the field doesn't even have a value when it's partially filled. https://stackoverflow.com/a/58669146

Did you find this page helpful?