Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Disable multiple dates/date types in dcc.DatePicker* #126

Open
radumas opened this issue Dec 12, 2017 · 13 comments
Open

Disable multiple dates/date types in dcc.DatePicker* #126

radumas opened this issue Dec 12, 2017 · 13 comments

Comments

@radumas
Copy link

radumas commented Dec 12, 2017

I'll open this here but I am aware that you're using AirBnB's react-dates so I'll start here and then open an issue there if it's not something that can be implemented on the dash side.

We'd like to disable "categories" of days from being selected. Our smallest request would be disabling weekdays or weekends, but generally supplying a list of available dates or unavailable dates to the DatePicker would be 👍

@chriddyp
Copy link
Member

Thanks for reporting @radumas !

On a quick glance, it looks like maybe isDayBlocked is the property to use here. The DatePickers would need to convert that property (which is a function) into something that can be serialized as JSON, like a list of dates and/or a pattern of dates

@radumas
Copy link
Author

radumas commented Dec 12, 2017

@slowmountain
Copy link

Hi! Any updates on this? Supplying a list of unavailable dates would be very helpful for me as well.

@yakneens
Copy link

+1 This would be a good property from the base component to expose in Dash. It would be nice to be able to provide a list or a function that's called on each date to tell if it's blocked. I think that's how it works in the base React component.

@byronz
Copy link
Contributor

byronz commented Aug 8, 2019

see if it fits in #600

@radupm
Copy link

radupm commented Sep 30, 2020

Any updates / plans for this? I hope it won't be ignored (since it's >2yrs ago). I was also missing this feature in several places. Had to use dcc.Dropdown as an alternative, which is a pity, considering this is based on react-dates which already has this prop available.

@SimonKnorke
Copy link

Hi, I would also be excited to see an update to this feature. Having an interface to the DatePicker to disable or mark individual dates would be really useful.

@RunQi-Han
Copy link

RunQi-Han commented Oct 28, 2021

With Dash 2.0, this feature is available now. @SimonKnorke @radupm

@cedro-gasque
Copy link

@RunQi-Han Is there documentation anywhere on this? I can't find a pull request for it, nor is it mentioned in the documentation or shows up in the github repo as far as I can tell.

@RunQi-Han
Copy link

RunQi-Han commented Nov 4, 2021

@RunQi-Han Is there documentation anywhere on this? I can't find a pull request for it, nor is it mentioned in the documentation or shows up in the github repo as far as I can tell.

@cedro-gasque https://github.com/plotly/dash/releases

@cedro-gasque
Copy link

@RunQi-Han this link does not say anything about pattern matching. It doesn't even mention the Date Picker. The last update I can find for the Date Picker was the addition of the disabled_days property, before Dash 2.0 even came out.

@RunQi-Han
Copy link

@RunQi-Han this link does not say anything about pattern matching. It doesn't even mention the Date Picker. The last update I can find for the Date Picker was the addition of the disabled_days property, before Dash 2.0 even came out.

@cedro-gasque isn't this one? #948

@etiennecelery
Copy link

This would be awesome, as many applications are used in work environments where usually there are no movements at the weekends, so one could disable the option.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants