Skip to content

Conversation

ddudenin
Copy link
Contributor

@ddudenin ddudenin commented Sep 7, 2025

Plan

  • Implement new component that returns the date selection in a well-typed format.
  • Picker type: Single day.
  • Allow user to enter a date value.
  • One-month view: supports displaying a single month calendar view.
  • Internationalization support.
  • Pass tests.
    • Compilation.
    • Check, clippy tests.
    • Doc comments.
    • Playwright.

Fixes #119

Calendar
Fixes #129 Fixes #130


It was decided to break the task down into its subtasks.

A task was created to select a date range and implement a two-month view: supports displaying two consecutive months side-by-side #132

ddudenin and others added 3 commits September 7, 2025 19:01
- Select single day
- Use time create for dates
- Displaying a single month calendar view
- No examples in docs
- Fix CalendarSelectYear/CalendarSelectMonth date math bug
@ddudenin
Copy link
Contributor Author

@ealmloff before implementing extended functionality and making the component look good, I'd like to get some feedback on the component's current architecture.

The behavior with hiding the calendar may look suspicious, but for now I need this implementation to simplify debugging.

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 for working on this! This is one of the first components that builds on top of the existing primitives. You are re-using the calendar logic which is great, I wonder if we could also re-use the logic for the popover component

@ddudenin ddudenin force-pushed the main branch 3 times, most recently from 6b85c64 to aba0045 Compare September 24, 2025 15:58
  - Add popover with Calendar
  - Pass Calendar as child
  - Correct input validation
  - Split from preview
  - Fix add Calendar empty cells
  - Localization
@ddudenin
Copy link
Contributor Author

ddudenin commented Oct 3, 2025

@ealmloff I'd like to request a component review again

Important changes:

  1. Calendar display via Popover;
  2. Calendar properties can be passed to the component externally, while all the logic remains internal;
  3. Calendar bugs have been fixed (see description);
  4. Localization;
  5. Improved keyboard input (range input will need further work);

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.

The interaction model seems a bit odd in the preview. I click on the dropdown to select a date, then it closes the preview with the range only half filled. Then if I click on the dropdown again, it lets me choose the second date and then the first date again before closing the preview.

It might make sense to remove range support from the date picker until the calendar component itself supports ranges

@ddudenin
Copy link
Contributor Author

ddudenin commented Oct 4, 2025

@ealmloff

@npatsakula and I discussed the task and agreed that it needed to be broken down into subtasks, meaning we'd implement only one date selection within this wish.

To support date ranges in the Сalendar and Date Picker, I created new tasks and changed the current task description with a note about the work plan change.

open: open(),
on_open_change: move |v| open.set(v),
PopoverTrigger { attributes: props.attributes,
svg {
Copy link
Member

Choose a reason for hiding this comment

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

This SVG is related to how the date picker is displayed, not a core part of the interactions / accessibility so it should also be in the styled version of the component in the preview

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.

Invalid Calendar grid Calendar min/max validation error DatePicker.
2 participants