Skip to content

Commit

Permalink
fix(DatePicker2): fix error state display, close #3410 (#4340)
Browse files Browse the repository at this point in the history
Co-authored-by: 林俊 <[email protected]>
  • Loading branch information
AsabaHarumasa and 林俊 authored May 23, 2023
1 parent b9689b0 commit e2eb732
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/date-picker2/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@
&#{$date-picker2-prefix}-input-disabled {
@include input-disabled();
}

&#{$date-picker2-prefix}-input-error {
border-color: $input-feedback-error-border-color;
}
}

&-input-separator {
Expand Down
1 change: 1 addition & 0 deletions src/date-picker2/panels/date-input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ class DateInput extends React.Component {
[`${prefixCls}-focus`]: focus,
[`${prefixCls}-noborder`]: !hasBorder,
[`${prefixCls}-disabled`]: isRange && Array.isArray(disabled) ? disabled.every(v => v) : disabled,
[`${prefixCls}-error`]: state === 'error',
}
);

Expand Down

0 comments on commit e2eb732

Please sign in to comment.