Skip to content

Commit 3d4333a

Browse files
committed
fix(ui): clearable when date not null
1 parent 014f83e commit 3d4333a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/ui/src/components/_date-input/DateInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ function DateInput(props: DDateInputProps, ref: React.ForwardedRef<DDateInputRef
199199
forceUpdate();
200200
};
201201

202-
const clearable = dClearable && !visible && !dDisabled;
202+
const clearable = dClearable && !isNull(_value) && !visible && !dDisabled;
203203

204204
const maxZIndex = useMaxIndex(visible);
205205

packages/ui/src/styles/components/date-picker.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
height: 26px;
7878
cursor: pointer;
7979

80-
&:not(.is-active, .is-hover, .is-another, .is-between, .is-between-hover):hover {
80+
&:not(.is-current-selected, .is-another-selected, .is-hover, .is-between, .is-between-hover):hover {
8181
background-color: var(--#{$rd-prefix}background-color-hover);
8282
}
8383

0 commit comments

Comments
 (0)