Skip to content

Conversation

@humdingerb
Copy link
Member

Choosing a date with the calendar button, the selected date was hard-coded with "." as delimiter as "day.month.year". The later parsing interpreted this as "month/day/year" when the locale is set to e.g. US American.

This fixes that by creating the date string according to the current locale. It's not really satisfying - as the whole date-handling back-forth between BDate and strings of the whole app feels wasteful... OTOH, adding another locale conversion here isn't that bad, as it's only invoked once for the date chosen in the calendar window...

Fixes #129

Choosing a date with the calendar button, the selected date was hard-coded
with "." as delimiter as "day.month.year". The later parsing interpreted
this as "month/day/year" when the locale is set to e.g. US American.

This fixes that by creating the date string according to the current locale.
It's not really satisfying - as the whole date-handling back-forth between
BDate and strings of the whole app feels wasteful...
OTOH, adding another locale conversion here isn't that bad, as it's only
invoked once for the date chosen in the calendar window...

Fixes HaikuArchives#129
@korli
Copy link
Contributor

korli commented Dec 21, 2025

LGTM

@humdingerb
Copy link
Member Author

Thanks for checking!

@humdingerb humdingerb merged commit 6706ab4 into HaikuArchives:master Dec 22, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

datepicker flip flops the date

2 participants