Skip to content

Better Calendar interface #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Better Calendar interface #107

wants to merge 6 commits into from

Conversation

ddudenin
Copy link
Contributor

@ddudenin ddudenin commented Aug 7, 2025

Plan

  • Replace custom CalendarDate with chrono.
  • Replace numeric weekday / month representations with native Rust enum types (chrono::Month and chrono::Weekday).
  • Implement string conversion function to support i18n with dynamic language switching.
  • Add support for custom month labels.
  • Pass tests.
    • Compilation.
    • Check, clippy tests.
    • Doc comments.
    • Playwright.

Post testing

  • Current year out of range (year select component)
  • Set enabled date range

Usability

@ddudenin ddudenin changed the title use chrono for calendar Better Calendar interface Aug 7, 2025
@npatsakula
Copy link
Contributor

@ealmloff, can we add dioxus-i18n dependency into preview crate? We'd like to add example of localization that I mentioned in issue.

@ealmloff
Copy link
Member

ealmloff commented Aug 8, 2025

@ealmloff, can we add dioxus-i18n dependency into preview crate? We'd like to add example of localization that I mentioned in issue.

Yes, a dioxus-i18n variant of the calendar would be great. I'm not as concerned about dependencies/build times on the preview crate because you can easily modify the styled components when you copy them into your project

@ddudenin
Copy link
Contributor Author

A component for changing the language has been added to the main toolbar. For now, locale changes only work for the calendar
I suggest that the rest of the localization work be done by a separate PR

@ddudenin ddudenin marked this pull request as ready for review August 13, 2025 12:34
Copy link

@npatsakula
Copy link
Contributor

I played with demo and found a bug with scrolling by years. @ddudenin, can I ask you to look at it?

image

@ddudenin ddudenin marked this pull request as draft August 14, 2025 12:23
@ddudenin
Copy link
Contributor Author

  1. Month and year selection components are added as basic calendar components.
  2. Мaximum and minimum date values parameters are added.
  3. Min/max parameters are used when changing the date, including for month and year selection lists.

@ddudenin ddudenin marked this pull request as ready for review August 15, 2025 19:24
@ddudenin ddudenin marked this pull request as draft August 15, 2025 20:48
@ddudenin ddudenin marked this pull request as ready for review August 16, 2025 18:52
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.

3 participants