svelte-plugins / datepicker

A simple datepicker component designed for Svelte.
https://svelte-plugins.github.io/datepicker
MIT License
54 stars 12 forks source link

✨ Ranged and preset events #28

Open Pebor opened 3 months ago

Pebor commented 3 months ago

I use this library on site that works with a lot of data, I let users control in what range they want to see said data displayed, but currently, from what I at least gathered, there is no way to get an event at a ranged selection or a preset click, so there is no comfortable time to update the data on the site.

Currently I can only change my data according to the dates whenever either endDate and startDate change, so it gets called twice when picking a range.

The data update is performance hitting, so it would be much better instead of chaining it with reactivity, just having an event "onRangePicked" or just simply "onApply" would be greatly appreciated.

dysfunc commented 2 months ago

Thank you for submitting an issue. I'll include an on onRangeChange. I'm currently out for another month (had a baby), but will look at this when I'm back.

Pebor commented 2 months ago

Thanks and huge congrats! :smile: