#TimePicker field not allow to set 24 hrs format.

9 messages · Page 1 of 1 (latest)

dusty goblet
#

TimePicker::make('picker')->displayFormat('H:i'),
I tried this but the it not allow to me set 13 for 1 PM, When I type 13 it turn into 1.

peak python
#

Can you not just pass ->seconds(false) to make it hour format?

TimePicker::make('picker')->displayFormat('H:i')
    ->seconds(false),

Probably also saver to use native(false)

gleaming vale
#

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)

narrow shell
#

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')

toxic iris
narrow shell
#

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.