fragaria / angular-daterangepicker

Angular.js wrapper for dangrossman/bootstrap-daterangepicker
MIT License
519 stars 372 forks source link

Always use JS Date type in model value #127

Closed fracz closed 5 years ago

fracz commented 8 years ago

This should fix #49

Before, depending on what the initial value for daterangepicker was, the model contained either JS Date objects or moments.

After this PR, the model always contains JS Dates for date ranges (or single dates if singleDatePicker is set to true).

This might be considered breaking change, because someone migtht have assumed that the component is returning moments.

Why JS Date instead of moment?

JS Date is native. Moment is just a library that might be changed in the future.