Skip to content
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

ShadDatePicker popover jumps around and forward arrow styled wrong #277

Closed
matthew-carroll opened this issue Jan 30, 2025 · 2 comments
Closed
Assignees
Labels
accepted A valid and reproducible issue bug Something isn't working

Comments

@matthew-carroll
Copy link

Steps to reproduce

Not sure which details matter for repro. I'm just opening a date picker and then navigating back across months.

Expected results

The calendar popover remains in the same place.

Actual results

The calendar popover jumps from above to below, and from below to above.

shadcn_ui version

0.18.4

Platform

MacOS

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration
Screen.Recording.2025-01-29.at.10.18.34.PM.mov

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]
@matthew-carroll matthew-carroll added bug Something isn't working triage Issues that need assessment and prioritization labels Jan 30, 2025
@nank1ro nank1ro self-assigned this Jan 30, 2025
@nank1ro nank1ro added accepted A valid and reproducible issue and removed triage Issues that need assessment and prioritization labels Jan 30, 2025
@nank1ro
Copy link
Owner

nank1ro commented Jan 30, 2025

Replicated the bug about the forward icon, will fix it soon.

About the jumps, this is because the default anchor is set to ShadAnchorAuto(). The number of days for a month change so the height changes. This means it will try to fit in the best position (preferBelow is true by default) but below there is not enough space and will show it on top. If on top there is not enough space it will be shown below.

You can force the anchor you want with this code anchor: const ShadAnchor()
The default ShadAnchor has the following values:

ShadAnchor({
  Alignment childAlignment = Alignment.topLeft,
  Alignment overlayAlignment = Alignment.bottomLeft,
  Offset offset = Offset.zero,
})

@nank1ro
Copy link
Owner

nank1ro commented Jan 30, 2025

The icon color has been fixed in the v0.18.5

@nank1ro nank1ro closed this as completed Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted A valid and reproducible issue bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants