adopted-ember-addons / ember-pikaday

A datepicker component for Ember CLI projects.
MIT License
159 stars 169 forks source link

Improve `minDate` and `maxDate` parsing #204

Open alexlafroscia opened 5 years ago

alexlafroscia commented 5 years ago

Currently, it seems like minDate and maxDate both must be Date objects, otherwise things blow up, because getTime is called on whatever is passed in

https://github.com/adopted-ember-addons/ember-pikaday/blob/4097041f439832102fb09840757ec85a10fb1b40/addon/mixins/pikaday.js#L146

https://github.com/adopted-ember-addons/ember-pikaday/blob/4097041f439832102fb09840757ec85a10fb1b40/addon/mixins/pikaday.js#L171

I think that, in both cases, the object should first be converted to a Date (or moment object?`) and then the time extracted.

alexlafroscia commented 5 years ago

This seems to be addressed by #188 so I’ll hold off making a fix in favor of allowing that PR to handle it.