mominsamir / smDateTimeRangePicker

Angular Material Date Picker, DateTime Picker, Date Range Picker, Date Time range picker
http://mominsamir.github.io/smDateTimeRangePicker/
MIT License
130 stars 50 forks source link

fix(moment): use UTC for moment() #135

Closed wesleifreitas closed 7 years ago

wesleifreitas commented 7 years ago

There is a problem with UTC for endDate. See an example:

In sm-range-picker-input, selecte TODAY untitled-1 fw

Result: untitled-2 fw

This happens because of UTC.

Solution:

change endDate:moment().endOf('day') by endDate:moment().utc().endOf('day')

untitled-3 fw

wesleifreitas commented 7 years ago

I think that object could only be: { startDate: 2017-03-14T00:00:00.000Z endDate: 2017-03-14T23:59:59.999Z }