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

Calendar 组件缺少value属性,表单中无法使用 #2451

Closed
1 task done
guxingke201 opened this issue Apr 10, 2018 · 7 comments
Closed
1 task done

Calendar 组件缺少value属性,表单中无法使用 #2451

guxingke201 opened this issue Apr 10, 2018 · 7 comments
Labels

Comments

@guxingke201
Copy link

guxingke201 commented Apr 10, 2018

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

What problem does this feature solve?

表单中使用可以使用Calendar组件

What does the proposed API look like?

类似其他Data Entry组件,提供value属性

@ant-design-bot
Copy link

Translation of this issue:


Calendar component is missing the value attribute and cannot be used in the form

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

What problem does this feature solve?

Use Calendar component for use in forms

What does the proposed API look like?

Similar to other Data Entry components, providing the value attribute

@warmhug
Copy link
Contributor

warmhug commented Apr 10, 2018

@zhang740 评估下是否需要

@guxingke201
Copy link
Author

antd的RangePicker组件有value属性

@doxiaodong
Copy link
Contributor

@likezero

@moldauder
Copy link

moldauder commented Sep 9, 2018

+1 ,目前无法实现月份切换的功能。实际业务场景中存在这样的需求(只展示一个月,通过切换实现上个月、下个月,如预订类业务)

@guxingke201
Copy link
Author

@likezero 请问已经修复了吗?在哪个版本

@chen86860
Copy link

可以通过更新 defaultDate 的值 + 给定 Calendar 一个 key 值来强制更新,以达到月份切换的目的。

例:

<Calendar key={new Date(currentDate)} defaultDate={new Date(currentDate)} />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants