Skip to content

Commit 73fe97f

Browse files
refactor(date-editor): allow nullables for value (#14169)
Co-authored-by: Nikolay Alipiev <[email protected]>
1 parent eae3c1f commit 73fe97f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

projects/igniteui-angular/src/lib/directives/date-time-editor/date-time-editor.directive.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,14 +166,14 @@ export class IgxDateTimeEditorDirective extends IgxMaskDirective implements OnCh
166166
* ```
167167
*/
168168
@Input()
169-
public set value(value: Date | string) {
169+
public set value(value: Date | string | undefined | null) {
170170
this._value = value;
171171
this.setDateValue(value);
172172
this.onChangeCallback(value);
173173
this.updateMask();
174174
}
175175

176-
public get value(): Date | string {
176+
public get value(): Date | string | undefined | null {
177177
return this._value;
178178
}
179179

@@ -218,7 +218,7 @@ export class IgxDateTimeEditorDirective extends IgxMaskDirective implements OnCh
218218
private document: Document;
219219
private _isFocused: boolean;
220220
private _defaultInputFormat: string;
221-
private _value: Date | string;
221+
private _value?: Date | string;
222222
private _minValue: Date | string;
223223
private _maxValue: Date | string;
224224
private _inputDateParts: DatePartInfo[];

0 commit comments

Comments
 (0)