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

datePicker的mode为'year'时,选中年份,下拉框不会消失 #10425

Closed
LJJCherry opened this issue May 8, 2018 · 10 comments

Comments

Projects
None yet
7 participants
@LJJCherry
Copy link

commented May 8, 2018

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

Version

3.4.4

Environment

chrome

Reproduction link

https://codepen.io/anon/pen/gzowME?editors=0010

Steps to reproduce

https://codepen.io/anon/pen/gzowME?editors=0010

What is expected?

选择年份后下拉框关闭

What is actually happening?

选择年份后下拉框未关闭

@ant-design-bot

This comment has been minimized.

Copy link

commented May 8, 2018

Translation of this issue:


DatePicker's mode is 'year', the selected year, the drop-down box does not disappear

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

Version

3.4.4

Environment

Chrome

Reproduction link

https://codepen.io/anon/pen/gzowME?editors=0010

Steps to reproduce

https://codepen.io/anon/pen/gzowME?editors=0010

What is expected?

Drop-down box closes after selecting year

What is actually happening?

Drop-down box does not close after selecting year

@zhujinxuan

This comment has been minimized.

Copy link
Contributor

commented May 9, 2018

Why is there no onChange function in your codepen.io example?

@funfish

This comment has been minimized.

Copy link

commented May 10, 2018

面板切换是触发onPanelChange事件,设计中就是要选了年份后,mode切换为month,继续选月份的,所以下拉框不会消失,但是这里mode一直为year,所以什么都没有变化

@afc163 afc163 closed this May 10, 2018

@afc163

This comment has been minimized.

Copy link
Member

commented May 10, 2018

@LJJCherry

This comment has been minimized.

Copy link
Author

commented May 20, 2018

@那就是还不支持单纯的年份选择框是吗?@afc163

@LJJCherry

This comment has been minimized.

Copy link
Author

commented May 20, 2018

我其实只是希望通过mode为year实现一个单纯的年份选择框。。。 @funfish

@LJJCherry

This comment has been minimized.

Copy link
Author

commented May 20, 2018

Because when I set mode to 'year', onChange doesn't work ,but I can get the Changed year from 'onPanelChange', In my project,I just want a year picker @zhujinxuan

@qinyuhua

This comment has been minimized.

Copy link

commented Jun 26, 2018

我也遇到了这个问题,请问楼主解决了吗?

@panjiefeng

This comment has been minimized.

Copy link

commented Nov 6, 2018

the source code of rc-calendar only support year panel which isn't a 'Picker'. There is a solution that I repackage a component by using the API of the DatePicker. hope this helps!
https://codepen.io/panjunfen/pen/pQJpRa

@afc163

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.