@acorex/components 16.20.12 → 16.20.13

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.
@@ -15350,35 +15350,14 @@ class AXTimePickerComponent extends AXBaseTextComponent {
15350
15350
  this.input.nativeElement.focus();
15351
15351
  }
15352
15352
  handleInputBlur(e) {
15353
- if (this.textValue.indexOf('-') !== -1) {
15354
- switch (this.type) {
15355
- case 'HHmmss':
15356
- this.textValue = '--:--:--';
15357
- break;
15358
- case 'HHmm':
15359
- this.textValue = '--:--';
15360
- break;
15361
- case 'HH':
15362
- this.textValue = '--';
15363
- break;
15364
- case 'hhmmss':
15365
- this.textValue = '--:--:--';
15366
- break;
15367
- case 'hhmm':
15368
- this.textValue = '--:--';
15369
- break;
15370
- case 'hh':
15371
- this.textValue = '--';
15372
- break;
15373
- case 'hhmmssam':
15374
- this.textValue = this.valueSam;
15375
- break;
15376
- case 'hhmmam':
15377
- this.textValue = this.valueMam;
15378
- break;
15379
- case 'hham':
15380
- this.textValue = this.valueHam;
15381
- break;
15353
+ if (this.type === 'HHmm') {
15354
+ const v = this.textValue;
15355
+ if ((v && /^\d{2}[::](-|-_|__|--)$/.test(v)) || /^\d{2}:\D\D$/.test(v)) {
15356
+ const hour = Number(v.substring(0, 2));
15357
+ if (hour >= 0 && hour <= 23) {
15358
+ this.value = `${v.substring(0, 2)}:00`;
15359
+ return;
15360
+ }
15382
15361
  }
15383
15362
  }
15384
15363
  }