jquery-timepicker icon indicating copy to clipboard operation
jquery-timepicker copied to clipboard

Doesn't work properly with input type=time

Open dev-softwareistic opened this issue 4 years ago • 3 comments
trafficstars

This is my html DOM <input id="timePicker" type="time" class="time" />

And this is my script var timepicker = $('#timePicker').timepicker({ 'timeFormat': 'h:i a', 'step': 30 });

And that's the warning I am getting when pick any time from picker and the selected value is not setting up on picker The specified value "01:30 am" does not conform to the required format. The format is "HH:mm", "HH:mm:ss" or "HH:mm:ss.SSS" where HH is 00-23, mm is 00-59, ss is 00-59, and SSS is 000-999.

dev-softwareistic avatar Apr 21 '21 12:04 dev-softwareistic

Try it with a 24hr time format and no am/pm

var timepicker = $('#timePicker').timepicker({ 'timeFormat': 'H:i', 'step': 30 });

jonthornton avatar Apr 22 '21 02:04 jonthornton

Yes it worked, but the requirement is 1-12 with am/pm. Is there any way of doing that with your plugin?

dev-softwareistic avatar Apr 22 '21 13:04 dev-softwareistic

I'm not sure the plugin is the issue. Can you get that time format working on input type=time without the plugin?

jonthornton avatar Apr 23 '21 02:04 jonthornton