i-tech-shared-components 1.4.73 → 1.4.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3223,7 +3223,11 @@ class TimeInputComponent {
3223
3223
  if (this.hours === '--')
3224
3224
  return;
3225
3225
  const h = parseInt(this.hours, 10);
3226
- if (h > 12) {
3226
+ if (h === 0) {
3227
+ this.hours = '12';
3228
+ this.amPm = 'AM';
3229
+ }
3230
+ else if (h > 12) {
3227
3231
  this.hours = String(h - 12).padStart(2, '0');
3228
3232
  this.amPm = 'PM';
3229
3233
  }
@@ -3265,6 +3269,9 @@ class TimeInputComponent {
3265
3269
  togglePicker(event) {
3266
3270
  if (this.isDisabled)
3267
3271
  return;
3272
+ if (this.mode === '12h') {
3273
+ this.convertIfOver12Hours();
3274
+ }
3268
3275
  this.isPickerOpen = !this.isPickerOpen;
3269
3276
  if (this.isPickerOpen) {
3270
3277
  setTimeout(() => this.scrollPickerToSelected());