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

fix(calendar, datepicker): fix MomentJS custom format support #12006

Merged
merged 1 commit into from
Sep 1, 2020

Conversation

Splaktar
Copy link
Contributor

@Splaktar Splaktar commented Sep 1, 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?

  • $$mdDateUtil.removeLocalTzAndReparseDate() was simplified, but it breaks MomentJS support

Issue Number:
Relates to #12003. Relates to #11949.

What is the new behavior?

  • 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

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 Sep 1, 2020
@Splaktar Splaktar self-assigned this Sep 1, 2020
@Splaktar Splaktar added P1: urgent Urgent issues that should be addressed in the next minor or patch release. type: bug labels Sep 1, 2020
@Splaktar Splaktar added this to the 1.1.26 milestone Sep 1, 2020
@Splaktar Splaktar requested a review from mmalerba September 1, 2020 00:13
@Splaktar Splaktar changed the title fix(calendar, datepicker): fix MomentJS support fix(calendar, datepicker): fix MomentJS custom format support Sep 1, 2020
@Splaktar Splaktar force-pushed the calendar-fix-moment-support branch 2 times, most recently from 3d1d434 to f2d967f Compare September 1, 2020 00:17
@Splaktar Splaktar added the pr: merge ready This PR is ready for a caretaker to review label Sep 1, 2020
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 force-pushed the calendar-fix-moment-support branch from f2d967f to 2ea4da1 Compare September 1, 2020 00:53
@Splaktar
Copy link
Contributor Author

Splaktar commented Sep 1, 2020

Added unit tests to verify that MomentJS custom date formatting keeps working in the future.

- 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 Splaktar force-pushed the calendar-fix-moment-support branch from 2ea4da1 to 6ff3b61 Compare September 1, 2020 01:26
@Splaktar Splaktar merged commit 667a78f into 1.1.x Sep 1, 2020
@Splaktar Splaktar deleted the calendar-fix-moment-support branch September 1, 2020 01:32
@Splaktar Splaktar added the pr: lgtm This PR has been approved by the reviewer label Sep 1, 2020
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/ P1: urgent Urgent issues that should be addressed in the next minor or patch release. pr: lgtm This PR has been approved by the reviewer pr: merge ready This PR is ready for a caretaker to review type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants