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

fix: set date-time-picker showWeekNumbers to false by default #7154

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

web-padawan
Copy link
Member

@web-padawan web-padawan commented Feb 27, 2024

Description

Fixes #7153

Note, the original property definition without default value comes from vaadin/vaadin-date-time-picker#18 which was probably just an oversight (especially as that PR didn't contain i18n implementation).

The fix works because it passes a non-undefined value to this function:

_getWeekDayNames(i18n, showWeekNumbers) {
if (i18n === undefined || showWeekNumbers === undefined) {
return [];
}

Which is then used to render short day names in the month calendar:

<template is="dom-repeat" items="[[_getWeekDayNames(i18n, showWeekNumbers)]]">
<th role="columnheader" part="weekday" scope="col" abbr$="[[item.weekDay]]" aria-hidden="true">
[[item.weekDayShort]]
</th>
</template>

Type of change

  • Bugfix

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@web-padawan web-padawan merged commit 57271a7 into main Feb 27, 2024
9 checks passed
@web-padawan web-padawan deleted the fix/dtp-show-week-numbers branch February 27, 2024 13:30
web-padawan added a commit that referenced this pull request Feb 27, 2024
…#7155)

Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.4.0.alpha9 and is also targeting the upcoming stable 24.4.0 version.

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

Successfully merging this pull request may close these issues.

[date-time-picker] Week day names are not shown by default
3 participants