Skip to content

Infragistics Community Forum / Web / Ignite UI for Angular / IgxTimepicker 24 hours format issue (AM/PM)

IgxTimepicker 24 hours format issue (AM/PM)

New Discussion
Nouman Naveed
Nouman Naveed asked on Feb 9, 2023 7:53 AM

Please refer to this

https://es.infragistics.com/products/ignite-ui-angular/angular/components/time-picker

When user types into the time picker which contains a 24 hour value “18:00” it converts into 06:00 AM

 

Expectation:

When user types into the time picker which contains a 24 hour value “18:00” it should converts into 06:00 PM

Sign In to post a reply

Replies

  • 0
    Georgi Anastasov
    Georgi Anastasov answered on Feb 9, 2023 7:53 AM

    Hello Nouman,

    I have been looking into your question and this is the expected behavior and result that follows setting only the time but not the abbreviation whether AM or PM. This is because the input format for the time in this sample is set to hh:mm tt, which means the user is prompted to enter the hour, minutes as well as AM or PM, if this does not happen and the user does not enter the given abbreviation, but only the hours and minutes, then by default it remembers AM. Also, the small h stands for the hours from 1 to 12 only, not all hours 1 to 24.

    What I could suggest as an approach is to change the input format according to your custom logic or to explicitly mention and remember the abbreviation AM/PM if you use this format. Another format you could use is HH:mm for hours and minutes 24 hour time with the capital H standing for all hours from 1 to 24 and so when you enter a given hour and minute it will be displayed in the given format.

    The described scenario could be observed here:

     

    In addition, I have prepared small sample illustrating this behavior which could be found here. Please test it on your side and let me know how it behaves.

    If you require any further assistance on the matter, please let me know.

    Regards,

    Georgi Anastasov

    Entry Level Software Developer

    Infragistics

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Nouman Naveed
Favorites
0
Replies
1
Created On
Feb 09, 2023
Last Post
3 years ago

Suggested Discussions

Created by

Created on

Feb 9, 2023 7:53 AM

Last activity on

Feb 19, 2026 1:16 PM