nextui icon indicating copy to clipboard operation
nextui copied to clipboard

[BUG] - DatePicker unexpectedly closes when value changes from null to a CalendarDateTime

Open lilkimo opened this issue 1 year ago • 3 comments

NextUI Version

@nextui-org/[email protected]

Describe the bug

DatePicker component unexpectedly closes when value property changes from null to a CalendarDateTime.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

import { toCalendarDateTime } from '@internationalized/date'

<DatePicker
  value={state} //const [ state, setState ] = useState(null)
  onChange={e => setState(toCalendarDateTime(e))}
/>

I had to do this workaround because there is no way to display the time fields without a default value (feat?)

Expected behavior

DatePicker doesnt closes and time fields appears.

Screenshots or Videos

Particulita

Operating System Version

Windows

Browser

Chrome

lilkimo avatar Oct 16 '24 02:10 lilkimo