I am using the time picker with PrimeNG calendar, and when I change the time, I get back a datetime property with the corresponding time in it. If I have time picker set to 3:15 am, it will correctly return 03:15 for the time portion of that date, and if I switch to PM, it will correctly change to 15:15. This is great, however, it doesn't work this way when the hour is set to 12. 12:15 am and 12:15 pm both return 12:15. How am I supposed to differentiate between am and pm when a user selects 12 for the hour?
For the sake of being thorough, here is the exact value I get back for
12:15 am:
Code: Select all
Wed Feb 22 2017 12:15:12 GMT-0600 (Central Standard Time)
and here is what I get back for
12:15 pm:
Code: Select all
Wed Feb 22 2017 12:15:12 GMT-0600 (Central Standard Time)
And here is my code:
Code: Select all
<p-calendar class="due-time" name="time-due" timeOnly="true" showTime="showTime" hourFormat="12" stepMinute="15" readonlyInput="readonlyInput"
[(ngModel)]="TimeDue" (ngModelChange)="updateTimeDue()"></p-calendar>