Skip to content

[Bug]: DatePicker popover is not aligned with the input #218

Description

@asphum

Component

date-picker

Describe the bug

The DatePicker calendar popover does not stay anchored to the input.

Expected: popover opens directly under the field (side="bottom", align="start").

Actual: the calendar floats to the right of the input (often over the neighboring column), so it looks disconnected from the field.

Reproduced on the docs page as well as in-app. portal defaults to true.

Screenshot: (attach the image)

Reproduction

Steps

  1. Open https://sv5ui.vercel.app/docs/components/date-picker
  2. In Multiple Months (or any DatePicker demo), click the date field / calendar icon
  3. Compare the popover position with the input

Minimal repro

<script lang="ts">
  import { DatePicker } from "sv5ui";
</script>

<div class="grid grid-cols-2 gap-8 p-8">
  <DatePicker />
  <p>Neighbor column</p>
</div>

Expected
Calendar popover is flush under the input (same left edge).

Actual
Popover is offset to the right, not aligned with the input.

<img width="786" height="372" alt="Image" src="https://github.com/user-attachments/assets/0896c5ab-0b57-4f85-a5b4-dbd6bf2e70f1" />

### sv5ui version

2.7.0

### Area

Not sure

### Checklist

- [x] I searched existing issues and this is not a duplicate.
- [x] I reproduced this on the latest version of sv5ui.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions