@ascentgl/ads-ui 21.16.3 → 21.16.4

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.
@@ -7931,10 +7931,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
7931
7931
  }] });
7932
7932
 
7933
7933
  const TIME_VALIDATOR = (control) => {
7934
+ if (!control.value) {
7935
+ return null;
7936
+ }
7934
7937
  const timeRegex = /^(0[1-9]|1[0-2])[0-5][0-9]$/;
7935
7938
  return timeRegex.test(control.value) ? null : { invalidTime: true };
7936
7939
  };
7937
7940
  const MILITARY_TIME_VALIDATOR = (control) => {
7941
+ if (!control.value) {
7942
+ return null;
7943
+ }
7938
7944
  const timeRegex = /^([01]\d|2[0-3]):?[0-5]\d$/;
7939
7945
  return timeRegex.test(control.value) ? null : { invalidMilitaryTime: true };
7940
7946
  };
@@ -7948,7 +7954,7 @@ class AdsTimeFieldComponent extends AdsInputDropdownComponent {
7948
7954
  /** @ignore */
7949
7955
  this.periodControl = new FormControl(null);
7950
7956
  /** @ignore */
7951
- this.timeControl = new FormControl('', { validators: [TIME_VALIDATOR], nonNullable: true });
7957
+ this.timeControl = new FormControl('', { validators: [TIME_VALIDATOR], nonNullable: true, updateOn: 'blur' });
7952
7958
  /** @ignore */
7953
7959
  this.periodOptions = ['AM', 'PM'];
7954
7960
  this.errorMessages = {