Skip to content

Commit 7490a8c

Browse files
committed
fix(datepicker): fix placeholder showing on clear for nonEditable inputs
1 parent 92df3e5 commit 7490a8c

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/components/date-picker/date-picker.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -611,11 +611,6 @@ export default class IgcDatePickerComponent extends FormAssociatedRequiredMixin(
611611
this._oldValue = this.value;
612612
this.value = null;
613613
this._input?.clear();
614-
615-
if (this.nonEditable || !this._isDropDown) {
616-
this._input.blur();
617-
Promise.resolve().then(() => this._input.focus());
618-
}
619614
}
620615

621616
/** Increments the passed in date part */

src/components/date-time-input/date-time-input.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,10 @@ export default class IgcDateTimeInputComponent extends EventEmitterMixin<
524524
return mask;
525525
}
526526

527+
if (this.readOnly) {
528+
return '';
529+
}
530+
527531
return this._maskedValue === '' ? mask : this._maskedValue;
528532
}
529533

0 commit comments

Comments
 (0)