Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The ngx-multiple-dates library uses the NativeDateAdapter from Angular Material to adapt native JavaScript dates to the Angular Material datepicker. However, the NativeDateAdapter was updated in Angular Material 14.0.0 to use the getFullYear method instead of the getYear method #33

Open
sureshrajana opened this issue Apr 11, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@sureshrajana
Copy link

Feature Description

ERROR TypeError: date.getFullYear is not a function
at _NativeDateAdapter.getYear (core.mjs:529:17)
at _NativeDateAdapter.compareDate (core.mjs:451:17)
at ngx-multiple-dates.mjs:569:54
at Array.map ()
at _MultipleDatesComponent._find (ngx-multiple-dates.mjs:569:23)
at _MultipleDatesComponent.dateClass (ngx-multiple-dates.mjs:445:14)
at matDatepicker.dateClass (ngx-multiple-dates.mjs:538:32)
at _MatMonthView._createWeekCells (datepicker.mjs:1560:49)
at _MatMonthView._init (datepicker.mjs:1469:10)
at Object.next (datepicker.mjs:1318:109)

Use Case

while load the dates from component we got the error

ERROR TypeError: date.getFullYear is not a function
at _NativeDateAdapter.getYear (core.mjs:529:17)
at _NativeDateAdapter.compareDate (core.mjs:451:17)
at ngx-multiple-dates.mjs:569:54
at Array.map ()
at _MultipleDatesComponent._find (ngx-multiple-dates.mjs:569:23)
at _MultipleDatesComponent.dateClass (ngx-multiple-dates.mjs:445:14)
at matDatepicker.dateClass (ngx-multiple-dates.mjs:538:32)
at _MatMonthView._createWeekCells (datepicker.mjs:1560:49)
at _MatMonthView._init (datepicker.mjs:1469:10)
at Object.next (datepicker.mjs:1318:109)

@sureshrajana sureshrajana added the enhancement New feature or request label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant