添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
坚韧的酸菜鱼  ·  Naturality Digital - ...·  3 月前    · 
爱搭讪的桔子  ·  uuidgen failed · ...·  8 月前    · 
高大的热带鱼  ·  A-Z Databases·  9 月前    · 

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 改造成本较高且回报略低,用 Select 更简单和直接,我们在 https://ant.design/components/calendar/ 里也是这么做的。

你可以让你们的产品看这个回复。

grunmin, fuzhongfeng, skyFi, lx70770, chilingling, wangpeng1994, and bailongctui reacted with laugh emoji XuChunxiao, fuzhongfeng, Running00, lx70770, stephanieDL, DongShi, and NUMLOCK0 reacted with confused emoji All reactions XuChunxiao, LokeWang, HuYuee, yoyo837, shadiniao, leopen-hu, aixfox, JonasJonny, lx70770, JJoan0116, and 12 more reacted with thumbs up emoji eduludi and panjiefeng reacted with confused emoji All reactions After set RangePicker's mode to ['month', 'month'], choose the second panel can't close the panel #11586

单纯下拉做不到 YearPicker 万年历 可选年份的需求。
Edit: 通常用在限制picker可选维度不同的地方,和DatePicker等一般是放在一起的,Picker的外观和交互更适合。

@jrschumacher Why not a picker ?

  • Same styles as DatePicker.
  • Select not exports moment instance.
  • No disabledDate api of Select.
  • Hoping more consideration of year picker, thank you!

    @lx70770 I'm not sure Google translated that correctly. Antd/rc-calendar does not support this mode. I have not heard anything from my PR.
    That's ok , Thank you so much!

    { 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 } /> }

    do like this ,you will fix this bug, combine use onOpenChange and onPanelChange (maybe you need onFocus onBlur)

    tks, 一江西流 关于antd 日期组件只选择年份,设置mode=year无法获取value的解决办法

    四个方法并用一定能完美实现你的需求,哈哈哈,官方说,你既然都单选了,为什么不用下拉框,说的好有道理,我竟无言以对
    阿里产品真的考虑周全呀,>_< 但是我们产品说,我就要这样,我不管

  • MonthDatePicker 05-01
  • RangePicker.YearPicker 2019 ~ 2020
  • RangePicker.MonthPicker 2019-01 ~ 2020-10
  • RangePicker.MonthDatePicker 05-01 ~ 06-08
  • RangePicker.WeekPicker 2019-23rd ~ 2019-45rd
  • TimePicker.RangePicker 11:00 ~ 18:30
  • { 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 } /> }

    do like this ,you will fix this bug, combine use onOpenChange and onPanelChange (maybe you need onFocus onBlur)

    tks, 一江西流 关于antd 日期组件只选择年份,设置mode=year无法获取value的解决办法

    四个方法并用一定能完美实现你的需求,哈哈哈,官方说,你既然都单选了,为什么不用下拉框,说的好有道理,我竟无言以对
    阿里产品真的考虑周全呀,>_< 但是我们产品说,我就要这样,我不管

    因为UI风格要统一,哈哈哈
    我就是一江西流

    单独维度的话,基于 DatePicker 改造成本较高且回报略低,用 Select 更简单和直接,我们在 https://ant.design/components/calendar/ 里也是这么做的。

    你可以让你们的产品看这个回复。

    厉害厉害 牛逼