Skip to content

Commit

Permalink
RangePicker support onMouseEnter、onMouseLeave (ant-design#260)
Browse files Browse the repository at this point in the history
* RangePicker support onMouseEnter、onMouseLeave

* Add Range picker support onMouseEnter and onMouseLeave test case
  • Loading branch information
XuChunxiao authored Jun 9, 2021
1 parent e19bac6 commit 6fca0f6
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 477 deletions.
6 changes: 6 additions & 0 deletions src/RangePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ export type RangePickerSharedProps<DateType> = {
onPanelChange?: (values: RangeValue<DateType>, modes: [PanelMode, PanelMode]) => void;
onFocus?: React.FocusEventHandler<HTMLInputElement>;
onBlur?: React.FocusEventHandler<HTMLInputElement>;
onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
onOk?: (dates: RangeValue<DateType>) => void;
direction?: 'ltr' | 'rtl';
autoComplete?: string;
Expand Down Expand Up @@ -204,6 +206,8 @@ function InnerRangePicker<DateType>(props: RangePickerProps<DateType>) {
onCalendarChange,
onFocus,
onBlur,
onMouseEnter,
onMouseLeave,
onOk,
onKeyDown,
components,
Expand Down Expand Up @@ -1080,6 +1084,8 @@ function InnerRangePicker<DateType>(props: RangePickerProps<DateType>) {
})}
style={style}
onClick={onPickerClick}
onMouseEnter={onMouseEnter}
onMouseLeave={onMouseLeave}
onMouseDown={onPickerMouseDown}
{...getDataOrAriaProps(props)}
>
Expand Down
Loading

0 comments on commit 6fca0f6

Please sign in to comment.