0

I'm using this time picker in my HTML form. Currently it's taking 12 hours format and it's showing AM/PM

this.timeInput = UWA.createElement('input',{
"type" : "time",
"value" : "12:00",
"step" : "1800", //30 minutes
"class": "form-control eno-duedatetime-input"
}).inject(this.mInputElement);

I have problems while retrieving the time(with AM/PM) - it only gives me (hrs:min)

timeInputElement.value

Ex : If time is set to 12:00 PM - i'm only able to retrieve 12:00

I need to do either one of these:

  1. Find a way to retrieve AM/PM
  2. Or show 24 hour format.

I prefer the 1st option. Or even i get a solution to 2nd option. It should be good.

Can anyone please assist on this.

Mohan S
  • 37
  • 8
  • 2
    Possible duplicate of [Get AM/PM from HTML time input](https://stackoverflow.com/questions/39310579/get-am-pm-from-html-time-input) – Goma Dec 05 '17 at 22:55
  • The value always is (hh:mm:ss) [Look at MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time#Time_value_format). See the suggested duplicate for more about retreiving the AM/PM. – Louys Patrice Bessette Dec 05 '17 at 23:06
  • folloe this link- https://stackoverflow.com/questions/47505579/how-can-i-make-this-timepicker-using-jquery-or-if-available-please-suggest/47506451#47506451 – Rahul Sahu Dec 06 '17 at 13:02

0 Answers0