Skip to content

Move to using Local date instead of UTC date for UI, with fallback#195

Merged
ealmloff merged 5 commits intoDioxusLabs:mainfrom
jaysonmaw:patch-2
Feb 12, 2026
Merged

Move to using Local date instead of UTC date for UI, with fallback#195
ealmloff merged 5 commits intoDioxusLabs:mainfrom
jaysonmaw:patch-2

Conversation

@jaysonmaw
Copy link
Contributor

UI "Today" dates should be based of the local users date not UTC.

  • Fix: Calendar / Date Picker sometimes opening to previous/next month depending on time zone
  • Fix: Calendar sometimes highlighting previous/next day as today depending on time zone

Requires enabling "local-offset" feature on time crate

Also includes a small extension method to encapsulate the fallback logic as well just to keep prop setters from getting a bit unwieldly, figure it is probably used enough to be worth it. rather than copying that everywhere.

(This can be tested with the Sensor tab in devtools, changing the location to one that is currently on a different day than UTC)

- Fix: Calender / Date Picker opening to previous/next month depending on timezone
- Fix: Calender highlighting previous/next day as today depending on timezone
@github-actions
Copy link

Copy link
Member

@ealmloff ealmloff left a comment

Choose a reason for hiding this comment

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

Thanks!

@ealmloff ealmloff merged commit cc61648 into DioxusLabs:main Feb 12, 2026
13 checks passed
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.

2 participants