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

SingleDatePicker can't select past dates #1392

Closed
artur-gajewski opened this issue Oct 10, 2018 · 1 comment
Closed

SingleDatePicker can't select past dates #1392

artur-gajewski opened this issue Oct 10, 2018 · 1 comment

Comments

@artur-gajewski
Copy link

artur-gajewski commented Oct 10, 2018

In SingleDatePicker component, enableOutsideDays prop doesn't enable selecting past dates. It even isn't working in the playbook:

http://airbnb.io/react-dates/?selectedKind=SDP%20-%20Calendar%20Props&selectedStory=with%20outside%20days%20enabled&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Factions%2Factions-panel

Version used: 17.2.0

@majapw
Copy link
Collaborator

majapw commented Oct 11, 2018

@artur-gajewski enableOutsideDays is for displaying those days in the month that belong to the previous or next month. If you want to select past days, pass in isOutsideRange={() => false}. There's a story for selecting past dates:

http://airbnb.io/react-dates/?selectedKind=SDP%20-%20Day%20Props&selectedStory=allows%20all%20days%2C%20including%20past%20days&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Factions%2Factions-panel

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

No branches or pull requests

2 participants