Skip to content

Commit

Permalink
fix(ui): clearable when date not null
Browse files Browse the repository at this point in the history
  • Loading branch information
xiejay97 committed Nov 18, 2022
1 parent 014f83e commit 3d4333a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/ui/src/components/_date-input/DateInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function DateInput(props: DDateInputProps, ref: React.ForwardedRef<DDateInputRef
forceUpdate();
};

const clearable = dClearable && !visible && !dDisabled;
const clearable = dClearable && !isNull(_value) && !visible && !dDisabled;

const maxZIndex = useMaxIndex(visible);

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/styles/components/date-picker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
height: 26px;
cursor: pointer;

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

Expand Down

0 comments on commit 3d4333a

Please # to comment.