Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

fix(datepicker): support ng-model-options timezone w/ Moment #11949

Merged
merged 1 commit into from
Jun 29, 2020

Conversation

Splaktar
Copy link
Contributor

@Splaktar Splaktar commented Jun 29, 2020

PR Checklist

Please check that your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added or this is not a bug fix / enhancement
  • Docs have been added, updated, or were not required

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Enhancement
[ ] Documentation content changes
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number:
Fixes #11945. Fixes #10598.

What is the new behavior?

  • support ng-model-options timezone w/ Moment
  • add demo for ng-model-options timezone support
  • pass datepicker's ng-model-options on to its calendar
  • fix case where datepicker's model is initially out of sync with the input value

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@googlebot googlebot added the cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ label Jun 29, 2020
@Splaktar Splaktar self-assigned this Jun 29, 2020
@Splaktar Splaktar added i18n: localization This issue is related to internationalization P1: urgent Urgent issues that should be addressed in the next minor or patch release. type: bug labels Jun 29, 2020
@Splaktar Splaktar added this to the 1.1.24 milestone Jun 29, 2020
@Splaktar Splaktar requested a review from jelbourn June 29, 2020 01:20
@Splaktar Splaktar added the pr: merge ready This PR is ready for a caretaker to review label Jun 29, 2020
@Splaktar Splaktar force-pushed the datepicker-locale-issues branch from 64e1cbe to cd69caa Compare June 29, 2020 01:22
- fix case where datepicker's model is initially out of sync
  with the input value
- add demo for `ng-model-options` timezone support
- pass datepicker's `ng-model-options` on to its calendar

Fixes #11945. Fixes #10598.
@Splaktar Splaktar force-pushed the datepicker-locale-issues branch from cd69caa to b0fdf73 Compare June 29, 2020 01:24
@Splaktar Splaktar changed the base branch from master to 1.1.x June 29, 2020 01:27
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Splaktar Splaktar requested review from mmalerba and removed request for jelbourn and andrewseguin June 29, 2020 17:19
@Splaktar Splaktar merged commit 12562b0 into 1.1.x Jun 29, 2020
@Splaktar Splaktar deleted the datepicker-locale-issues branch June 29, 2020 17:20
Splaktar added a commit that referenced this pull request Sep 1, 2020
- revert simplification of `$$mdDateUtil.removeLocalTzAndReparseDate()`

Relates to #12003. Relates to #11949.
Splaktar added a commit that referenced this pull request Sep 1, 2020
- revert simplification of `$$mdDateUtil.removeLocalTzAndReparseDate()`
- enable unit testing of MomentJS
- add test suite for MomentJS custom formatting

Relates to #12003. Relates to #11949.
Splaktar added a commit that referenced this pull request Sep 1, 2020
- revert simplification of `$$mdDateUtil.removeLocalTzAndReparseDate()`
- enable unit testing of MomentJS
- add test suites for MomentJS custom formatting in `dateLocale.spec.js`
  and `datepickerDirective.spec.js`

Relates to #12003. Relates to #11949.
Splaktar added a commit that referenced this pull request Sep 1, 2020
- revert simplification of `$$mdDateUtil.removeLocalTzAndReparseDate()`
- enable unit testing of MomentJS
- add test suites for MomentJS custom formatting in `dateLocale.spec.js`
  and `datepickerDirective.spec.js`

Relates to #12003. Relates to #11949.
Splaktar added a commit that referenced this pull request Sep 1, 2020
- revert simplification of `$$mdDateUtil.removeLocalTzAndReparseDate()`
- enable unit testing of MomentJS
- add test suites for MomentJS custom formatting in `dateLocale.spec.js`
  and `datepickerDirective.spec.js`

Relates to #12003. Relates to #11949.
Splaktar added a commit that referenced this pull request Sep 1, 2020
- revert simplification of `$$mdDateUtil.removeLocalTzAndReparseDate()`
- enable unit testing of MomentJS
- add test suites for MomentJS custom formatting in `dateLocale.spec.js`
  and `datepickerDirective.spec.js`

Relates to #12003. Relates to #11949.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ i18n: localization This issue is related to internationalization P1: urgent Urgent issues that should be addressed in the next minor or patch release. pr: merge ready This PR is ready for a caretaker to review type: bug
Projects
None yet
3 participants