react-bootstrap-datetimerangepicker
react-bootstrap-datetimerangepicker copied to clipboard
Predefined ranges to work onApply()
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?
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.