You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
After set RangePicker's mode to ['month', 'month'], choose the second panel can't close the panel #11586
It is not a bug, <DatePicker mode="year" /> don't equal to <YearPicker /> and <DatePicker mode="month" /> don't equal to <MonthPicker />, you guys can trace #4524 for further move.
Also you can control date panel visibility by open and onOpenChange.
Activity
ant-design-bot commentedon Aug 2, 2018
Hello @ghostflow. Please provide a online reproduction by forking this link https://u.ant.design/codesandbox-repro. Issues labeled by
Need Reproducewill be closed if no activities in 7 days.ghostflow commentedon Aug 2, 2018
you can confirm it at the official docs.
the Controlled Panels demo
jrschumacher commentedon Aug 31, 2018
This is also true when doing
<DatePicker mode="year" />while<DatePicker />works.Ref: https://repl.it/repls/ScratchyEqualPrintablecharacter
jrschumacher commentedon Sep 10, 2018
@afc163
tcatche commentedon Sep 14, 2018
貌似 onChange 事件不能触发,导致在表单中无法正常使用
jrschumacher commentedon Sep 19, 2018
@tcatche is this something which I need to fix in my code or is it related to ant/rc-datepicker?
tcatche commentedon Oct 12, 2018
The problem seems that a bug that onChange event can't triggered when use
mode="year"ormode="month"afc163 commentedon Oct 12, 2018
It is not a bug,
<DatePicker mode="year" />don't equal to<YearPicker />and<DatePicker mode="month" />don't equal to<MonthPicker />, you guys can trace #4524 for further move.Also you can control date panel visibility by
openandonOpenChange.Fujitomy commentedon Mar 29, 2019
<LocaleProvider locale={zhCN}> { getFieldDecorator(field)( <DatePicker placeholder={ placeholder || '请选择年份' } locale={ zhCN } // value={ this.state.time } open={ this.state.yearStartShow } mode='year' format='YYYY' // onChange={ this.handleChange } onOpenChange={ this.handleOpenChange } onPanelChange={ this.handlePanelChange } /> } </LocaleProvider>do like this ,you will fix this bug, combine use onOpenChange and onPanelChange (maybe you need onFocus onBlur)
tks, 一江西流 关于antd 日期组件只选择年份,设置mode=year无法获取value的解决办法
四个方法并用一定能完美实现你的需求,哈哈哈,官方说,你既然都单选了,为什么不用下拉框,说的好有道理,我竟无言以对
阿里产品真的考虑周全呀,>_< 但是我们产品说,我就要这样,我不管
afc163 commentedon Jun 5, 2019
@aladingding #16984