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

when DatePicker.RangePicker set mode=['month', 'month'] , there disabledDate is wrong #9008

Closed
sharkwarn opened this issue Jan 18, 2018 · 14 comments
Assignees
Labels
help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. Inactive IssueHuntFest

Comments

@sharkwarn
Copy link

sharkwarn commented Jan 18, 2018

Version

3.1.3

Environment

react

Reproduction link

https://sharkwarn.github.io/#/

Steps to reproduce


  disabledDate=(value) => {
    return true
  }
....
  render() {
    return (
      <div>
          <RangePicker
            disabledDate={this.disabledDate}
            mode={ ['month', 'month']}
          />
      </div>
    )

What is expected?

disabled some Date

What is actually happening?

The disabledDate doesn't work

@yesmeck
Copy link
Member

yesmeck commented Jan 18, 2018

disabledDate is designed for days only.

For months and weeks we may need disabledMonth and disabledWeek.

@marcosfede
Copy link
Contributor

marcosfede commented Jan 18, 2018

Is there any way to implement disabling months on the rangepicker on version 3.1.3 ? using disabledDate does not work.

@jeffycai
Copy link

jeffycai commented Jan 29, 2018

I think this is a reasonable demand, and the antd team can give priority to support.

@yesmeck yesmeck added the help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. label Jan 29, 2018
@yesmeck
Copy link
Member

yesmeck commented Jan 29, 2018

Tagging as PR welcome.

@jzhng
Copy link
Contributor

jzhng commented Apr 17, 2018

PR sent to rc-calendar. It seems we don't need disabledMonth or disabledWeek, current disabledDate callback is fine. Not sure if I missed something.

@couzic
Copy link

couzic commented Jun 6, 2018

I'm experiencing this issue, currently with antd 3.6.1. disabledDate still has no effect.

Is the fix supposed to have been applied already ?

@hengkx
Copy link
Member

hengkx commented Sep 21, 2018

+1

@swwinone
Copy link

swwinone commented Mar 14, 2019

When can you support?

@lj2312763
Copy link

lj2312763 commented May 7, 2019

I would like to know if the problem has been solved. I still have this problem in version 3.17.0
我想知道问题解决了没,我在3.17.0版本还有这个问题

@crazyair
Copy link
Member

crazyair commented Jul 8, 2019

现在支持了吗? @afc163

@afc163
Copy link
Member

afc163 commented Mar 13, 2020

Please check new RangePicker in antd v4, it should be rewriten and fixed now.

https://ant.design/components/date-picker/

@afc163 afc163 closed this as completed Mar 13, 2020
@mizi-lin
Copy link

mizi-lin commented Jul 1, 2020

这解决方案神了··

@tanabalu
Copy link

tanabalu commented Jul 21, 2020

所以v4实现了,v3的坑就不填了吗……

@lishaoh
Copy link

lishaoh commented Feb 25, 2021

应该是这样

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. Inactive IssueHuntFest
Projects
None yet
Development

No branches or pull requests