tamble / jquery-ui-daterangepicker

A JQuery UI based date range picker.
MIT License
184 stars 110 forks source link

Can't retrive chosen dates #68

Open mirosladov opened 7 years ago

mirosladov commented 7 years ago

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 commented 7 years ago

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.