TimePicker field not allow to set 24 hrs format.
I tried this but the it not allow to me set 13 for 1 PM, When I type 13 it turn into 1.
8 Replies
Can you not just pass
->seconds(false)
to make it hour format?
Probably also saver to use native(false)

its the native browser time input
if you dont want the native browser one you can use the 24 hour js one with ->native(false)
How did you get the 12 hrs. format by default? I am getting 24 hrs. format and am trying to set 12 hrs. format but it does not seem to work.
I am using the below code... Any help would be much appreciated.
TimePicker::make('endTime')
->label('End Time')
->withoutSeconds()
->required()
->format('h:i A')
The last answer from Dan explained it. Did you read it?
Yes I read it. I am not using native(false) in my code, so according to the answer I should be getting the 12 hr format right? But still I am getting the 24 hrs format itself.

I am not using native(false)The last answer said you should use exactly that, because the native picker uses your browser settings.