svelty-picker
svelty-picker copied to clipboard
FlowBite Svelte : Clicking on date close modal form
If your modal form has the "autoclose" property. Clicking on a date on the datepicker will close your form.
Not sure this is related to svelty-picker 🤔 Can you provide working REPL?
i believe he used svelty-picker and the popup getting closed while he trying to choose date it is not svelty-picker problem it is the popup it self this is how I solved it in my project with skeleton UI
const PickArea: PopupSettings = {
event: 'click',
target: 'PickArea',
placement: 'bottom',
closeQuery: '.sdt-today-btn' // here the magic , it will prevent any close unless you click Ok button
};
<div data-popup="PickArea">
<SveltyPicker
pickerOnly
mode="datetime"
format={'yyyy-mm-dd hh:ii'}
isRange
bind:value={date}
on:change={DateChanged}
/>
<div class="arrow bg-surface-100-800-token" />
</div>
I am closing this one, because it's not related directly to the package and @RoxDevvv provided useful example how situation similar to this can be handled.