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

4.x的RangePicker属性defaultPickerValue无效 #21811

Closed
1 task done
javier3434 opened this issue Mar 3, 2020 · 1 comment · Fixed by react-component/picker#427
Closed
1 task done

4.x的RangePicker属性defaultPickerValue无效 #21811

javier3434 opened this issue Mar 3, 2020 · 1 comment · Fixed by react-component/picker#427
Labels
4.x In Ant Design 4.0 🐛 Bug Ant Design Team had proved that this is a bug. Inactive

Comments

@javier3434
Copy link

javier3434 commented Mar 3, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

在3.x中,设置rangepicker的面板默认显示【上个月-本月】,可以用rangepicker的属性defaultPickerValue实现

<RangePicker

defaultPickerValue={[moment().subtract(1, "month"), moment()]}

format="YYYY-MM-DD HH:mm:00"

/>
image

而新版本这样设置无效,即使我把defaultPickerValue={[moment().subtract(2, "month"), moment()]}改为defaultPickerValue={moment().subtract(1, "month")}(注意前者是传了数组,后者是传了一个moment)依旧无效。

image

@afc163 afc163 added 4.x In Ant Design 4.0 🐛 Bug Ant Design Team had proved that this is a bug. labels Mar 3, 2020
@PresByter2015
Copy link

解决了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x In Ant Design 4.0 🐛 Bug Ant Design Team had proved that this is a bug. Inactive
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants