Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复在左侧输入框聚焦时右侧面板切换月份失效问题 #1292

Merged
merged 1 commit into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/date-picker/DateRangePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const DateRangePicker = forwardRef<HTMLDivElement, DateRangePickerProps>((props,

// 日期点击
function onCellClick(date: Date, { e, partial }) {
onPick?.(date, { e, partial });
onPick?.(date, { e, partial: activeIndex ? 'end' : 'start' });

setIsHoverCell(false);
setIsSelected(true);
Expand Down
4 changes: 2 additions & 2 deletions src/date-picker/panel/RangePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const RangePanel = forwardRef<HTMLDivElement, RangePanelProps>((props, ref) => {
[
<PanelContent
key="startPanel"
partial={activeIndex ? 'end' : 'start'}
partial={'start'}
year={startYear}
month={startMonth}
time={time[0]}
Expand All @@ -162,7 +162,7 @@ const RangePanel = forwardRef<HTMLDivElement, RangePanelProps>((props, ref) => {
/>,
<PanelContent
key="endPanel"
partial={activeIndex ? 'end' : 'start'}
partial={'end'}
year={endYear}
month={endMonth}
time={time[1]}
Expand Down