Skip to content

Comments

feat: support locale in DatePicker#578

Merged
jrasm91 merged 4 commits intomainfrom
feat/locale-datepicker
Feb 10, 2026
Merged

feat: support locale in DatePicker#578
jrasm91 merged 4 commits intomainfrom
feat/locale-datepicker

Conversation

@michelheusschen
Copy link
Collaborator

Adds required locale prop to DatePicker for calendar and date format localization. It maintains the en-US default when undefined.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

📖 Preview of ui.immich.app deployed to ui.pr-578.dev.immich.app

Copy link
Member

@jrasm91 jrasm91 left a comment

Choose a reason for hiding this comment

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

Would it be better to default it to navigator.language in the component itself?

@michelheusschen
Copy link
Collaborator Author

Hmm not sure. If the date picker were only used inside this library I’d say yes, but in Immich Web we should always pass the app locale <DatePicker locale={$locale} /> so I made the locale required to avoid it being forgotten.

@jrasm91
Copy link
Member

jrasm91 commented Feb 10, 2026

Could we add a state/manager for locale and we just set it once in immich-web? Like setLocale($locale) and then it can be automatically used in any components that need it?

@michelheusschen
Copy link
Collaborator Author

Yep good idea, I've added that 👍

@jrasm91 jrasm91 merged commit 437c040 into main Feb 10, 2026
7 checks passed
@jrasm91 jrasm91 deleted the feat/locale-datepicker branch February 10, 2026 18:39
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.

2 participants