Skip to content

Commit eb6be5b

Browse files
committed
test(date-picker): fix failing test, #6471
1 parent 7f61ed4 commit eb6be5b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

projects/igniteui-angular/src/lib/date-picker/date-picker.component.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,6 @@ export class IgxDatePickerComponent implements IDatePicker, ControlValueAccessor
386386
if (this._ngControl && this._ngControl.control && this._ngControl.control.validator) {
387387
// Run the validation with empty object to check if required is enabled.
388388
const error = this._ngControl.control.validator({} as AbstractControl);
389-
// this.inputGroup.isRequired = error && error.required;
390389
return error && error.required;
391390
}
392391
}
@@ -970,7 +969,9 @@ export class IgxDatePickerComponent implements IDatePicker, ControlValueAccessor
970969
}
971970
}
972971

973-
this.inputGroup.isRequired = this.required;
972+
if (this.inputGroup && this.inputGroup.isRequired !== this.required) {
973+
this.inputGroup.isRequired = this.required;
974+
}
974975
}
975976

976977
/**

0 commit comments

Comments
 (0)