bootstrap-ui-datetime-picker icon indicating copy to clipboard operation
bootstrap-ui-datetime-picker copied to clipboard

Setting ngModelOptions timezone to UTC results in incorrect calendar picker date

Open jonathon-oodar opened this issue 8 years ago • 1 comments
trafficstars

If the datetime-picker is instantiated with ng-model-options={ timezone: 'UTC' } and a date is passed, the date will display correctly in the input field but the wrong date square may be highlighted in the calendar picker depending on the time and the local time zone. E.g. my local time zone is +11:00 at the moment, if I create the datetime-picker and set the model to a time earlier than 11am, the calendar picker will select the previous day.

I've created a plunker that demonstrates this here: http://plnkr.co/edit/t4LzL2LiEkXwqBWfpVOT?p=preview The initial date set to the model is Nov 17th 2am, equivalent to (here): Nov 17 2017 13:00:00 GMT+1100

image

jonathon-oodar avatar Nov 17 '17 07:11 jonathon-oodar

I believe this is working, as i cannot get the wrong date is appear? Can you also try the latest version released today 2.6.2

Gillardo avatar Apr 17 '18 08:04 Gillardo