Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

uib-datepicker-popup timezone setting does not work #6146

Closed
cyberfish-dev opened this issue Aug 8, 2016 · 4 comments
Closed

uib-datepicker-popup timezone setting does not work #6146

cyberfish-dev opened this issue Aug 8, 2016 · 4 comments

Comments

@cyberfish-dev
Copy link

To reproduce :

  1. Set local timezone to -10:00
  2. Set timezone option of uib-datepicker-popup to be '-4:00'
  3. Set this date to ng-model option of datepicker-popup 'Sun Aug 07 2016 18:00:00 GMT-1000 (Hawaiian Standard Time)'
  4. I expect that datepicker will show Sun Aug 08 because it must add 6 hours to provided date, but I can see this http://prntscr.com/c31oav , when I open popup, I see the 8 selected though.
  5. When I try to select any date within popup, it acts similar : the date within popup is more than date within input box.
@wesleycho
Copy link
Contributor

Note that the popup and datepicker itself both have configurable ng-model-options. See documentation for both. I suspect this is the issue both for this and #6147.

@wesleycho
Copy link
Contributor

See #6147 (comment) - this is a user error.

@cyberfish-dev
Copy link
Author

Here is the plunker
http://plnkr.co/edit/ufBnXUWEr9aCtGL0Ij4E

  1. please set your local machine time to Mon Aug 08, 05:00 AM , with timezone GMT-1000
  2. I expect that todays date of datepciker should be Mon Aug 08 in -04:00 timezone because
    Sun Aug 07 2016 18:00:00 GMT-1000 plus 6 hours must be Sun Aug 08 00:00, but input shows Aug 07 instead. When you open popup, it shows Aug 08 selected though.

@cyberfish-dev
Copy link
Author

confirm it works now as expected.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants