Skip to content

Add sr-Latn placeholder to datepicker for Serbian Latin locale#10034

Merged
reidbarber merged 1 commit into
adobe:mainfrom
nklaasse:fix/sr-latn-datepicker-placeholders
May 11, 2026
Merged

Add sr-Latn placeholder to datepicker for Serbian Latin locale#10034
reidbarber merged 1 commit into
adobe:mainfrom
nklaasse:fix/sr-latn-datepicker-placeholders

Conversation

@nklaasse
Copy link
Copy Markdown
Contributor

@nklaasse nklaasse commented May 8, 2026

Summary

Adds sr-Latn to the hardcoded placeholder dictionary in @react-stately/datepicker so that users with a Serbian Latin locale (sr-Latn / sr-Latn-RS) see Latin segment placeholders instead of Cyrillic ones.

Problem

The LocalizedStringDictionary in placeholders.ts has an entry for sr (Cyrillic: гггг, мм, дд) but no entry for sr-Latn. Because the dictionary falls back from sr-Latn-RSsr-Latnsr, users in a Serbian Latin locale see Cyrillic placeholders (гггг, мм, дд) in date fields instead of the Latin equivalents (gggg, mm, dd).

Fix

Add 'sr-Latn': {year: 'gggg', month: 'mm', day: 'dd'} to the dictionary, consistent with the placeholders used by Chrome and Firefox for <input type="date"> in that locale.

Related issue

Fixes #10033

yihuiliao
yihuiliao previously approved these changes May 8, 2026
@yihuiliao yihuiliao added the small review Easy to review PR label May 8, 2026
@yihuiliao
Copy link
Copy Markdown
Member

Thanks for the PR! Mind signing the CLA and then closing and reopening the pull to run the check again?

@nklaasse nklaasse closed this May 11, 2026
@nklaasse nklaasse reopened this May 11, 2026
@nklaasse nklaasse force-pushed the fix/sr-latn-datepicker-placeholders branch from 111b0ad to 17e4ea2 Compare May 11, 2026 17:10
@nklaasse nklaasse force-pushed the fix/sr-latn-datepicker-placeholders branch from 17e4ea2 to d3ff7b9 Compare May 11, 2026 17:11
@nklaasse nklaasse requested a review from yihuiliao May 11, 2026 17:14
Copy link
Copy Markdown
Member

@reidbarber reidbarber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@reidbarber reidbarber added this pull request to the merge queue May 11, 2026
Merged via the queue into adobe:main with commit 7df6106 May 11, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

small review Easy to review PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing sr-Latn placeholder in @react-stately/datepicker

3 participants