Setting [format]="24" will hide the "AM/PM" from the UI but won't actually use 24 hour format
See original GitHub issue<mat-form-field>
<input matInput name="interview_time" [(ngModel)]="input.interview_time" placeholder="Time" [ngxTimepicker]="interview_time" [format]="24">
<ngx-material-timepicker #interview_time></ngx-material-timepicker>
</mat-form-field>
Expected result:
Setting 11:30 PM using the timepicker UI would set the value of the <input>
to 23:30
on the UI.
Actual result:
Setting 11:30 PM using the timepicker UI sets the value of the <input>
to 11:30
on the UI. It simply removes the “am/pm” part, making it impossible for the user to tell the difference between them afterwards.
Notes:
It correctly sets the ngModel to string 11:30 PM
in both cases.
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (7 by maintainers)
Top Results From Across the Web
Big Sur doesn't allow me to change date/time format in menu bar
Go to Settings > Dock & Menu Bar > Clock and untick "Use a 24-hour clock", and enable "Show AM/PM" if you want....
Read more >How to change material-ui timepicker to 24 hour format
I would like to have my picker with a 24-hour format which would remove the AM/PM option. I've looked in the material-ui documentation...
Read more >Is there a way to switch to 24 hour time format instead of AM ...
Yes, you can achieve that either by manually typing the time-range with the 24-hour version in the time-range box or select the custom......
Read more >How to Remove AM/PM from Time in Excel - YouTube
... file here: https://www.bluepecantraining.com/how-to- remove - am-pm -from- time -in-excel- format - time -as-duration-elapsed- time - format /In this.
Read more >Galaxy S21/Ultra/Plus: How to Set Clock to Use 24 ... - YouTube
Learn how you can set the clock to use 24 hour format or AM/PM format on the Galaxy S21/Ultra/Plus.Gears I use :Velbon Sherpa...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I try it with two way binding and it works fine.
<input placeholder="24hr format" aria-label="24hr format" [ngxTimepicker]="fullTime" [format]="24" [(ngModel)]="test" readonly> <ngx-material-timepicker #fullTime></ngx-material-timepicker>
What does the input mean in yourinput.interview_time
? Is that just object or a form control?I’ll resolve it in 30 min