0

I have used AngularJS to create a datetime and time input field. A sample code would be:

<input type="datetime-local" id="startdate" datetime-format="yyyy-MM-dd HH:mm:ss" />
<input type="time" id="starttime" time-format="HH:mm:ss" />

The result on client was be:

This is image of the code above

So the outcome input fields from the client view doesn’t have correct format as I expected. Because I wanted it to be "yyyy-MM-dd HH:mm:ss" but it gave me "dd/MM/yyyy HH:mm"

You can see on fiddle: https://jsfiddle.net/prm739gj/

I want to format the datetime field as "yyyy-MM-dd HH:mm:ss" and time field as ="HH:mm:ss”. Could you help me to get a correct attribute for input field to format date time as I wanted?

Trind 07
  • 839
  • 1
  • 9
  • 20

0 Answers0