Switching format from 12h to 24h leads to error on picker
See original GitHub issueIssue Description
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.
After changing the format, the array is not updated.
I expected the hourList is updated properly on it’s own whenever the format is changed (like max. hours does).
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Already figured out the issue. Will be fixed soon
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 😉