svelty-picker icon indicating copy to clipboard operation
svelty-picker copied to clipboard

FlowBite Svelte : Clicking on date close modal form

Open R3D2 opened this issue 1 year ago • 2 comments

If your modal form has the "autoclose" property. Clicking on a date on the datepicker will close your form.

R3D2 avatar Dec 30 '23 14:12 R3D2

Not sure this is related to svelty-picker 🤔 Can you provide working REPL?

mskocik avatar Dec 30 '23 18:12 mskocik

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>

RoxDevvv avatar Jan 15 '24 20:01 RoxDevvv

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.

mskocik avatar Feb 19 '24 12:02 mskocik