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

Custom openDayEventsTemplate missing context params #1517

Open
Lesmian opened this issue Oct 24, 2021 · 1 comment
Open

Custom openDayEventsTemplate missing context params #1517

Lesmian opened this issue Oct 24, 2021 · 1 comment

Comments

@Lesmian
Copy link

Lesmian commented Oct 24, 2021

Describe the bug

If we use the default template for openDayEvents components to create a custom one, there will be an error:

Error: Unable to convert "undefined" into a date

this is because the default template uses date and locale params in order to generate spans with aria-label: openDayEventsAlert, openDayEventsLandmark, eventDescription, but at the same time this params are not added to ngTemplateOutletContext.

Minimal reproduction of the problem with instructions

Here's an extract from default template for open day events which uses missing params:
<span tabindex="-1" role="alert" [attr.aria-label]="{ date: date, locale: locale } | calendarA11y: 'openDayEventsAlert'"></span>
<span tabindex="0" role="landmark" [attr.aria-label]="{ date: date, locale: locale } | calendarA11y: 'openDayEventsLandmark'"></span>

Screenshots

and here we see that those params are missing in the outlet context:

image

Just to be clear, the missing params are:

@Input() locale: string;

@Input() date: Date;

Versions

  • @angular/core: 12.2.0
  • angular-calendar: 0.28.28
  • Browser name and version: Chrome Version 94.0.4606.81 (Official Build) (64-bit)
@matts-bot
Copy link

matts-bot bot commented Oct 24, 2021

Thanks so much for opening an issue! If you'd like me to give priority to answering your issue or would just like to support this project, then please consider sponsoring me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant