datepicker icon indicating copy to clipboard operation
datepicker copied to clipboard

🐛 DatePick shows for a few milliseconds on mount when isOpen is false

Open gregg-cbs opened this issue 8 months ago • 0 comments

Describe the bug The DatePicker seems to be mounting and then umounting on svelte mount. This happens in a matter of milliseconds so its not detectable normally but i picked it up in my Modal which transitions in.

It seems something in the DatePicker code is showing the DatePicker when isOpen is false. It seems it is showing the date picker and then hiding it as if the default behavior is to show and then to check the isOpen prop and hide.

For me this is a bad experience as when my modal opens and transitions in there is a large white space where the date picker is and then it disappears. My date picker is relatively positioned which is why it takes up space, it is not floating.

If I wrap the DatePicker in an if statement, i do not get this issue:

{#if is_open}
  <DatePicker 
    isOpen={true} 
  />
{/if}

Expected behavior DatePicker to not mount at all when isOpen is false

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Firefox
  • Version: 137.0b8

gregg-cbs avatar Mar 30 '25 14:03 gregg-cbs