-
-
Notifications
You must be signed in to change notification settings - Fork 727
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
Before/after modifiers issue with timezone #307
Comments
Could you please replicate your issue in a jsfiddle? https://jsfiddle.net/pkdcqvpk/ thanks! |
@gpbl I have just open your JSfiddle link and I was able to replicate this issue. Please see this screenshot. Today is 25th of april but still it is shown disabled. |
interesting ! thanks. what is your timezone? |
@gpbl My timezone is IST |
Thanks, I can replicate it! Until I don't publish the fix, as workaround you can use: <DayPicker
disabledDays={ {
before: new Date().setHours(0,0,0,0)
}}
/> See the updated jsfiddle. |
@gpbl Thanks for workaround, I will use it for development now, and I will wait for proper fix. |
@ktusharprdxn please upgrade to |
Hey @gpbl Thanks for the quick fix. 👍 |
This fix broke my code ( |
@martin-svk could you please replicate your problem https://jsfiddle.net/gpbl/cggxvq6t/ and eventually open a new issue? thanks |
I want to disable all days from current day, for that I have used
const range = { before: new Date() } <DayPicker initialMonth={ new Date() } disabledDays={range} selectedDays={ new Date() } onDayClick={this.handleDayClick} />
But it disabled current day as well, i.e. if today is 25th of april then all days before 25th should get disabled and current date i.e. 25th should get selected.
Can anyone please help me what went wrong here?
The text was updated successfully, but these errors were encountered: