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

Locale pt-PT displays weekdays in long format causing words to overlap #2817

Closed
3 tasks done
jasonmonroe opened this issue May 23, 2023 · 11 comments
Closed
3 tasks done

Comments

@jasonmonroe
Copy link

Prerequisites

Describe the issue

Locale pt-PT displays weekdays in long format causing words to overlap in the UI. Please fix this by abbreviating the weekdays. Thank you.

https://getdatepicker.com/6/plugins/customDateFormat.html
Locale: pt-PT

StackBlitz fork

//using "window" is just for the stackblitz, you do not need to do this
// https://stackblitz.com/edit/tempus-dominus-v6-simple-setup?file=index.js
window.datetimepicker1 = new tempusDominus.TempusDominus(
document.getElementById('datetimepicker1'),
{
localization: {
dayViewHeaderFormat: { month: 'long', year: '2-digit' },
locale: 'pt-PT',
startOfTheWeek: 1
}
});

document.getElementById(
'info'
).innerHTML = Your browser's locale is ${navigator.language}.<br/> You are using version ${tempusDominus.version};

What operating system(s) are you seeing the problem on?

macOS

What browser(s) are you seeing the problem on?

Chrome

What version of are you using? You can find this information from the sample StackBlitz.

6.2.10

What your browser's locale? You can find this information from the sample StackBlitz.

pt-PT

@jasonmonroe jasonmonroe added State: Triage Tickets that need to be triaged. Type: Bug labels May 23, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Tempus Dominus May 23, 2023
@Eonasdan Eonasdan changed the title Provide a general summary of the issue Locale pt-PT displays weekdays in long format causing words to overlap May 23, 2023
@Eonasdan
Copy link
Owner

You didn't provide a fork of the sample stackblitz. Please do that.

@jasonmonroe
Copy link
Author

jasonmonroe commented May 23, 2023 via email

@jasonmonroe
Copy link
Author

@Eonasdan
Copy link
Owner

Thank you. I see the issue

@jasonmonroe
Copy link
Author

@Eonasdan any updates? Are you going to simply abbreviate the weekdays in Portuguese or just only use the first three letters?

@Eonasdan Eonasdan added this to the 7.0 milestone Jul 3, 2023
@jasonmonroe
Copy link
Author

Thanks!

@Eonasdan
Copy link
Owner

I don't have any updates right now. There's not a good way for me to fix this easily at the moment. Those values come from Intl. In v7 I'll be looking at migrating these values to the locale scripts so that it can be customized.

@jasonmonroe
Copy link
Author

I don't have any updates right now. There's not a good way for me to fix this easily at the moment. Those values come from Intl. In v7 I'll be looking at migrating these values to the locale scripts so that it can be customized.

Is it possible to simply truncate or abbreviate the weekdays for pt-PT?

@Eonasdan
Copy link
Owner

Those values come from Intl

Anything I do now will affect all locales. You are welcome to fork and modify the picker or overwrite the function that generates the weekdays yourself until I have time to work on this.

@jasonmonroe
Copy link
Author

jasonmonroe commented Jul 16, 2023

Look at file date-display.ts line 186. Can we put a condition to str_limit(3) the innerDate.format?

@Eonasdan Eonasdan moved this from 🆕 New to 🏗 In progress in Tempus Dominus Nov 9, 2023
@Eonasdan Eonasdan removed this from the 7.0 milestone Nov 9, 2023
Eonasdan added a commit that referenced this issue Nov 10, 2023
@Eonasdan Eonasdan mentioned this issue Nov 10, 2023
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Tempus Dominus Nov 10, 2023
@Eonasdan
Copy link
Owner

Hello. This fixed with released with 6.7.19. A new option was added, maxWeekdayLength. You can set that to whatever number you want.

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

No branches or pull requests

2 participants