A simple Svelte5 text input component, utilising flatpickr package for date/time picking.
options for flatpickr as in official docs, can be updated during lifecycle of the component.
value attribute to get/set Date / Date[] / string / null. Although the output from flatpickr always is an array (empty for no picks).
value to the component it will get parsed to range of dates (if applicable) using provided rangeDelimiter (" - " by default).
noStartDateRender and noEndDateRender, in case of range selection, the output text will skip these.
returnAllDatesWithinRange will calculate and output to the component's value all dates within selected range in flatpickr (by default flatpickr outputs only begin and end dates in array).
class, style, name, id, placeholder, required
options.inline property to true, will solely render the calendar picker (without input element).
noEndDateRender with empty rangeDelimiter renders only begin date.
formData/, it is an , type text, with value already formatted (eventualy as range). You might want to enhance your form with the component's value instead, or parse the output text as Date if needed.