Skip to content

Commit 0ad066a

Browse files
authored
fix(datepicker): fix datepicker issues when clearing value and notch border (#1894)
1 parent e035870 commit 0ad066a

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

src/components/date-picker/themes/shared/date-picker.material.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33

44
$theme: $material;
55

6+
:host([outlined]) {
7+
igc-date-time-input::part(notch) {
8+
border-block-start: rem(2px) solid transparent;
9+
}
10+
}
11+
612
:host([outlined][readonly]:hover) {
713
igc-date-time-input::part(start),
814
igc-date-time-input::part(end),
@@ -83,7 +89,7 @@ $theme: $material;
8389
border-color: var-get($theme, 'error-secondary-color');
8490
}
8591

86-
&::part(notch) {
92+
igc-date-time-input::part(notch) {
8793
border-bottom-color: var-get($theme, 'error-secondary-color');
8894
}
8995
}

src/components/date-range-picker/themes/shared/date-range-picker.common.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ $theme: $material;
6060
}
6161
}
6262

63+
:host([outlined]) {
64+
igc-date-time-input::part(notch) {
65+
border-block-start: rem(2px) solid transparent;
66+
}
67+
}
68+
6369
:host(:not([readonly])) {
6470
--affix-color: #{var-get($theme, 'input-prefix-color')};
6571

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,10 @@ export default class IgcDateTimeInputComponent extends EventEmitterMixin<
535535
return mask;
536536
}
537537

538+
if (this.readOnly) {
539+
return '';
540+
}
541+
538542
return this._maskedValue === '' ? mask : this._maskedValue;
539543
}
540544

0 commit comments

Comments
 (0)