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

Can't set singleDatePicker dynamically #123

Closed
leocristofani opened this issue Mar 13, 2017 · 4 comments
Closed

Can't set singleDatePicker dynamically #123

leocristofani opened this issue Mar 13, 2017 · 4 comments

Comments

@leocristofani
Copy link

I need to set singleDatePicker dynamically but when I switch "singleDatePicker" between true and false, it does NOT update the dropdown between single and double calendar. Any idea how to fix this?

<DateRangePicker name={name} startDate={startDate} endDate={endDate} className="form-control" onApply={applyHandler(onChange)} locale={{ format: 'YYYY-MM-DD' }} singleDatePicker >{displayDate(value, singleDatePicker)}</DateRangePicker>

Thanks for this component!

@CarlosHdez
Copy link

Did you managed to fix this, I'm experiencing the same problem.

Thanks

@ashiquemohammed
Copy link

Ran into the same issue . Hoping for a solution .

@hassanuos
Copy link

hassanuos commented Oct 29, 2019

Guys try this. Its working for me.

$('#date_range').data('daterangepicker').singleDatePicker = false; //for double calendar
$('#date_range').data('daterangepicker').singleDatePicker = true; // for single calendar

@skratchdot
Copy link
Owner

closing this due to inactivity. please re-open if this is still an issue in v6.0.0 or greater

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

5 participants