ant-design / ant-design

An enterprise-class UI design language and React UI library
https://ant.design
MIT License
92.03k stars 49.14k forks source link

Date Range Picker is not rendering correct calendar on Preset Range clicked. #46329

Closed ceghap closed 6 months ago

ceghap commented 10 months ago

Reproduction link

https://ant.design/~demos/components-date-picker-demo-preset-ranges

Steps to reproduce

let say today date is 8/12/2023

  1. click date range picker.
  2. date range picker open.
  3. navigate to Jan 2023 on the calendar. this will show preset range date and also a calendar Jan 2023 and Feb 2023.
  4. then clicked to preset range date, 'Last 7 Days'
  5. it is selecting 2023-12-01 - 2023-12-08 which is good.
  6. click again the date range picker to open it
  7. see that the calendar is not showing selected 2023-12-01 - 2023-12-08 but it is still showing Jan 2023 and Feb 2023 calendar where we are at earlier

What is expected?

opening the date rang picker again should render it selected date range in the calandar which is 2023-12-01 - 2023-12-08 (December)

What is actually happening?

it is rendering previously navigated calendar

Environment Info
antd 5.12.1
React 18.2.0
System Windows 11
Browser Chrome 121.0.6167.8
CYBYOB commented 10 months ago

Follow the steps above for a successful repeat

zombieJ commented 6 months ago

Close since fixed in 5.14.0.