bootstrap-ui-datetime-picker
bootstrap-ui-datetime-picker copied to clipboard
Setting ngModelOptions timezone to UTC results in incorrect calendar picker date
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

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