Skip to content

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

@sureshrajana

Description

@sureshrajana

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions