Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Switching format from 12h to 24h leads to error on picker

See original GitHub issue

Hey guys,

whenever I changed the current format type from 12h to 24h, the picker leads to an error when going > 12 or < 1.


Details The form starts in the 12h format (hoursFormat=12). Depending on format settings it’s dynamically changed.

<ngx-timepicker-field [defaultTime]="currentTimeControl.value" [formControl]="currentTimeControl" [format]="hoursFormat" [toggleIcon]="timePickerIcon"> </ngx-timepicker-field> <ng-template #timePickerIcon> <span class="my-icon"></span> </ng-template>

Debugging with Augury let me observe, that the amount of available hours is not updated. Initially the array hoursList is an array of 12 elements. image

After changing the format, the array is not updated. image

I expected the hourList is updated properly on it’s own whenever the format is changed (like max. hours does).

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

Agranomcommented, Sep 9, 2019

Already figured out the issue. Will be fixed soon

yl-endresscommented, Sep 13, 2019

Thank you!

Unfortunately I am not able to test it because we still use Angular 7, that leads to compiler errors (ng s will lead to empty white screen)

WARNING in ./node_modules/ngx-material-timepicker/fesm5/ngx-material-timepicker.js 238:51-69 "export ‘ɵɵdefineInjectable’ was not found in ‘@angular/core

WARNING in ./node_modules/ngx-material-timepicker/fesm5/ngx-material-timepicker.js 297:56-74 "export ‘ɵɵdefineInjectable’ was not found in ‘@angular/core

WARNING in ./node_modules/ngx-material-timepicker/fesm5/ngx-material-timepicker.js 323:33-51 "export ‘ɵɵdefineInjectable’ was not found in ‘@angular/core

WARNING in ./node_modules/ngx-material-timepicker/fesm5/ngx-material-timepicker.js 323:117-125 "export ‘ɵɵinject’ was not found in ‘@angular/core

WARNING in ./node_modules/ngx-material-timepicker/fesm5/ngx-material-timepicker.js 323:153-161 "export ‘ɵɵinject’ was not found in ‘@angular/core

WARNING in ./node_modules/ngx-material-timepicker/fesm5/ngx-material-timepicker.js 323:179-187 "export ‘ɵɵinject’ was not found in ‘@angular/core

WARNING in ./node_modules/ngx-material-timepicker/fesm5/ngx-material-timepicker.js 323:199-207 "export ‘ɵɵinject’ was not found in ‘@angular/core’ i 「wdm」: Compiled with warnings.

=> I have to wait until we updated to 8.x . So far I simply trust in your development 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Show Time in 12 and 24 hour format in UIDatepicker on the ...
For UIDatePicker you cannot change the time format to 24 or 12, ... Since the device local are not in 24 hour. select...
Read more >
Solved: 24 hour to 12 hour date picker issue
I changed the date and time picker from 24-hr to 12-hr format. Below is the entry in the card items: AmPmValue1.Items: ["AM", "PM"]...
Read more >
How do I change the time format? For 24 hours
Locate* and replace the current value with the value below respectively and click Update : ...
Read more >
Set 12 vs 24 hour with the new date formatting API in iOS 15
The problem that I'm having is figuring out how to force the new API to display 12 vs 24h times. So, for example,...
Read more >
Solved: How do I convert time format from 12h am/pm to 24h...
You could convert time format in Modeling->Format. 4.png. Best Regards. Maggie. View solution in original post.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found