Skip to content

DatePicker: open state keeps getting set to true #1808

@Duckapple

Description

@Duckapple

Describe the bug

In my Svelte app, my date picker implementation requires accepting and emitting date-objects from dayjs. So far, it has worked well, using some effects to sync the bound prop value to an internalValue $state which is bound to the DatePicker.Root.

After a dependency update, the date picker suddenly didn't want to close the picker when the user chooses a date, even when closeOnDateSelect is either unset or set to true. This didn't update the effect, and so the input is broken.

The problem appeared while I was trying to bump the version from 2.9.4 to latest. Bumping back, I found out the problem was introduced in 2.9.6.

I was able to see that onOpenChange still works correctly, calling ={console.log} with false when picking a value, the issue is with the bound open prop.

(I'll add the repro later today)

Reproduction

I'll add the repro later today

Logs

System Info

System:
    OS: Linux 6.8 Ubuntu 24.04.3 LTS 24.04.3 LTS (Noble Numbat)
    CPU: (16) x64 AMD Ryzen 7 PRO 7840U w/ Radeon 780M Graphics
    Memory: 26.73 GB / 61.45 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 24.8.0 - ~/.local/share/pnpm/node
    npm: 11.6.0 - ~/.local/share/pnpm/npm
    pnpm: 10.17.1 - ~/.local/share/pnpm/pnpm


  @sveltejs/kit: 2.36.3
  svelte: 5.35.7
  dayjs: 1.11.18

Severity

blocking an upgrade

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageA maintainer needs to review this issue and label it appropriately

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions