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

Proposal for Calendar #1762

Open
sebilasse opened this issue Oct 21, 2021 · 0 comments
Open

Proposal for Calendar #1762

sebilasse opened this issue Oct 21, 2021 · 0 comments

Comments

@sebilasse
Copy link
Contributor

Enhancement

I think the month names in Calendar might be an overhead.
In my own widgets I am using a fallback for the renderMonthLabel if Intl is available

function renderMonthLabel(month: number, year: number) {
  let { monthNames, renderMonthLabel } = properties();
  if (!monthNames && !renderMonthLabel) {
    const d = new Date(Date.UTC(year, month, 1, 3, 0, 0));
    return new Intl.DateTimeFormat('en-US', {month: 'long'}).format(d)
  }
  // ... 
}
This returns the localised label for a month.
But not sure about i18n …
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