Skip to content

Localize the DatePicker date format - #44

Merged
colemancda merged 1 commit into
masterfrom
feature/datepicker-locale
Jul 23, 2026
Merged

Localize the DatePicker date format#44
colemancda merged 1 commit into
masterfrom
feature/datepicker-locale

Conversation

@colemancda

Copy link
Copy Markdown
Member

The DatePicker's trailing button formatted its date with a hardcoded English month table ("Jan 1, 2000" everywhere). It now uses the device locale's medium date style via DateFormat.getDateInstance(MEDIUM), keeping the UTC timezone that matches the epoch-millis it's fed.

Verification

  • Emulator (en-US, More Controls screen): the DatePicker shows "Jan 1, 2000" — unchanged for English.
  • The formatter is genuinely locale-aware (ran the exact logic on the JVM across locales):
    • en-US → Jan 1, 2000
    • fr-FR → 1 janv. 2000
    • ja-JP → 2000/01/01
    • de-DE → 01.01.2000

Non-rooted emulator images don't allow a locale switch for a device screenshot, hence the JVM cross-locale check; the on-device en-US output matches the en-US column, confirming the same path.

@colemancda
colemancda merged commit d58c6ca into master Jul 23, 2026
6 checks passed
@colemancda
colemancda deleted the feature/datepicker-locale branch July 23, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant