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

first row gets missed on specific locale #2757

Closed
3 tasks done
tirolel opened this issue Feb 1, 2023 · 4 comments
Closed
3 tasks done

first row gets missed on specific locale #2757

tirolel opened this issue Feb 1, 2023 · 4 comments
Labels
Area: Locale Area: TypeScript Priority: Medium State: Pending Release This issue has been resolved in the dev branch and is waiting on a new release Type: Bug

Comments

@tirolel
Copy link

tirolel commented Feb 1, 2023

Prerequisites

Describe the issue

While testing our web application, we find out that if we set start of the week, the first row gets missing. I have already searched duplicates/closed issues, and I came accross this one, which #2537 is almost same issue but it seems its closed and fixed (?)

In the documentation, https://getdatepicker.com/6/options/localization.html#startOfTheWeek, it says there is no apis to get locales start of the week. I'am not sure, but I think we can obtain the first day of week, by doing following:

const firstDayOfWeek = new Intl.Locale(locale).weekInfo.firstDay;

But let say if use 'ar-iq' as locale, and get the firstDayOfWeek, from Intl Api, so saturday is first day of week (6).
As per example, the first row gets hidden/removed.

I found out that, same issue exist on indian, "hi-hi" locale.

StackBlitz fork

https://stackblitz.com/edit/tempus-dominus-v6-simple-setup-ghennc?file=index.js

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

Windows, Linux

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.

Latest, 6.2.10

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

da-DK / en-gb

@tirolel tirolel added the State: Triage Tickets that need to be triaged. label Feb 1, 2023
@Eonasdan
Copy link
Owner

This appears to be a bug in the logic that attempts to figure out what the first week should look like based on the startOfTheWeek. This isn't really a locale issue, since it does something similar with en-us.

According to MDN and CanIUse weekInfo isn't available on FF-based browsers, which unfortunately means I can't use that to "guess".

@github-project-automation github-project-automation bot moved this to 🆕 New in Tempus Dominus May 22, 2023
@Eonasdan Eonasdan moved this from 🆕 New to 🔖 Ready in Tempus Dominus May 22, 2023
Eonasdan added a commit that referenced this issue May 24, 2023
@Eonasdan
Copy link
Owner

Hi, please check this StackBlitz.

@Eonasdan Eonasdan moved this from 🔖 Ready to 👀 In review in Tempus Dominus May 24, 2023
@tirolel
Copy link
Author

tirolel commented May 24, 2023

Thank you, It looks great!

@Eonasdan Eonasdan added State: Pending Release This issue has been resolved in the dev branch and is waiting on a new release and removed State: Waiting feedback labels May 24, 2023
@Eonasdan Eonasdan moved this from 👀 In review to ✅ Done in Tempus Dominus May 24, 2023
Eonasdan added a commit that referenced this issue Jul 3, 2023
* #2791 more tests

* #2791 more tests

* #2791 more tests

* #2757 should fix start of the week (#2818)

* Add type attribute to meridiem button (#2822)

Resolves #2820

* repl improvements

* repl improvements

* Fix typo in Finnish locale (fi.ts) (#2824)

Renamed Edelline -> Edellinen

* #2575 open on focus (#2832)

* #2575 open on focus

* Add type attribute to meridiem button (#2822)

Resolves #2820

* repl improvements

* repl improvements

* Fix typo in Finnish locale (fi.ts) (#2824)

Renamed Edelline -> Edellinen

* repl improvements

* repl improvements

* repl improvements

* repl improvements

---------

Co-authored-by: axunonb <[email protected]>
Co-authored-by: Pertti Roitto <[email protected]>

* #2621 potential fix (#2833)

---------

Co-authored-by: axunonb <[email protected]>
Co-authored-by: Pertti Roitto <[email protected]>
Eonasdan added a commit that referenced this issue Jul 3, 2023
* #2791 more tests

* #2791 more tests

* #2791 more tests

* #2757 should fix start of the week (#2818)

* Add type attribute to meridiem button (#2822)

Resolves #2820

* repl improvements

* repl improvements

* Fix typo in Finnish locale (fi.ts) (#2824)

Renamed Edelline -> Edellinen

* #2575 open on focus (#2832)

* #2575 open on focus

* Add type attribute to meridiem button (#2822)

Resolves #2820

* repl improvements

* repl improvements

* Fix typo in Finnish locale (fi.ts) (#2824)

Renamed Edelline -> Edellinen

* repl improvements

* repl improvements

* repl improvements

* repl improvements

---------

Co-authored-by: axunonb <[email protected]>
Co-authored-by: Pertti Roitto <[email protected]>

* #2621 potential fix (#2833)

---------

Co-authored-by: axunonb <[email protected]>
Co-authored-by: Pertti Roitto <[email protected]>
@Eonasdan
Copy link
Owner

Eonasdan commented Jul 3, 2023

This has been released

@Eonasdan Eonasdan closed this as completed Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Locale Area: TypeScript Priority: Medium State: Pending Release This issue has been resolved in the dev branch and is waiting on a new release Type: Bug
Projects
Archived in project
Development

No branches or pull requests

2 participants