blackbaud / skyux1

DEPRECATED This site contains the codebase for the AngularJS (1.x) implementation of the SKY UX framework. We no longer support this version of SKY UX, and we recommend that you use the latest version instead. https://developer.blackbaud.com/skyux/
MIT License
51 stars 68 forks source link

bb-datepicker does not respect timezone offset for ISO 8601 string input #1056

Open Blackbaud-SarahMalick opened 7 years ago

Blackbaud-SarahMalick commented 7 years ago

Expected behavior

I should be able to assign an ISO 8601 string with a timezone offset to the bb-datepicker model and have it respect the given timezone offset.

Actual behavior

Assigning an ISO 8601 string with a timezone offset to the bb-datepicker model results in a date field with the previous date, instead of the intended assigned date.

Steps to reproduce

  1. Navigate to the plunker from the datepicker component page: http://skyux.developer.blackbaud.com/components/datepicker/

  2. Set self.date2 = '2017-07-31T00:00:00+00:00';

  3. Notice that the Date field has the date listed as 7/30/2017 instead of 7/31/2017.

    • Note: the date field will say 7/30/2017 regardless of the offset specified (+/- xx:xx).

Plunker

http://plnkr.co/edit/wvjwsPDPsN60DeNfxgEA?p=preview

Blackbaud-PatrickOFriel commented 7 years ago

The code in question is probably here: https://github.com/blackbaud/skyux/blob/master/js/sky/src/datepicker/datepicker.parser.js#L11