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

Predefined ranges to work onApply() #17

Open
NehaSharma2304 opened this issue Oct 13, 2017 · 1 comment
Open

Predefined ranges to work onApply() #17

NehaSharma2304 opened this issue Oct 13, 2017 · 1 comment

Comments

@NehaSharma2304
Copy link

NehaSharma2304 commented Oct 13, 2017

I am trying to use predefined range feature of this library with custom calendar and time picker, but predefined range works on selection of default range but my custom calendar works on click of apply button. It looks inconsistent, can someone help?

@cmyers
Copy link
Contributor

cmyers commented Oct 13, 2017

You can set the autoApply prop to true which will hide the apply and cancel buttons and trigger onApply after selecting a custom date range. This is specified in the docs, I've not tried it myself so not sure it works. If that doesn't work you could potentially subscribe to the onChange event that is fired when a date is selected, and use those dates when an endDate is chosen.

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