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 retrive chosen dates #68

Open
mirosladov opened this issue Sep 25, 2016 · 1 comment
Open

Can't retrive chosen dates #68

mirosladov opened this issue Sep 25, 2016 · 1 comment

Comments

@mirosladov
Copy link

Hello, sir! I'm initializing daterangepicker like this:
$("#e1").daterangepicker({ open: function(event, data) { console.log('open') }, change: function(event, data) { console.log(data.dateStart + data['dateStart']) }, clear: function(event, data) { console.log('clear') }, cancel: function(event, data) { console.log('cancel') } });

The callback function (as I usderstand that stuff) meant to fire on "change" sends to console log neither "data.dateStart" neither data['dateStart']. There is some objectObject inside "data" variable. But I dont understand how to mine from that objec start date and end date. And I do suffer without them(

Thank you for attention!

@op16
Copy link
Contributor

op16 commented Sep 26, 2016

The selected start and end dates are available as data.instance.getRange().start and data.instance.getRange().end.

TODO the docs need a better example.

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