diff --git a/examples/svelte-ts/src/App.svelte b/examples/svelte-ts/src/App.svelte index 6e0230fc56..c3c5c42e9a 100644 --- a/examples/svelte-ts/src/App.svelte +++ b/examples/svelte-ts/src/App.svelte @@ -12,6 +12,8 @@ import Combobox from "./routes/combobox.svelte" import ContextMenu from "./routes/context-menu.svelte" import DatePicker from "./routes/date-picker.svelte" + import DatePickerMulti from "./routes/date-picker-multi.svelte" + import DatePickerRange from "./routes/date-picker-range.svelte" import Dialog from "./routes/dialog.svelte" import Editable from "./routes/editable.svelte" import FileUpload from "./routes/file-upload.svelte" @@ -57,6 +59,8 @@ { path: "/combobox", component: Combobox }, { path: "/context-menu", component: ContextMenu }, { path: "/date-picker", component: DatePicker }, + { path: "/date-picker-multi", component: DatePickerMulti }, + { path: "/date-picker-range", component: DatePickerRange }, { path: "/dialog", component: Dialog }, { path: "/editable", component: Editable }, { path: "/file-upload", component: FileUpload }, diff --git a/examples/svelte-ts/src/routes/date-picker-multi.svelte b/examples/svelte-ts/src/routes/date-picker-multi.svelte new file mode 100644 index 0000000000..83e065afdb --- /dev/null +++ b/examples/svelte-ts/src/routes/date-picker-multi.svelte @@ -0,0 +1,141 @@ + + +
+
+ +
+

{`Visible range: ${api.visibleRangeText.formatted}`}

+ + +
Selected: {api.valueAsString ?? "-"}
+
Focused: {api.focusedValueAsString}
+
+ +
+ + + +
+ +
+
+
+ + + +
+ + + +
+ + + +
+
+
+
+ + + + diff --git a/examples/svelte-ts/src/routes/date-picker-range.svelte b/examples/svelte-ts/src/routes/date-picker-range.svelte new file mode 100644 index 0000000000..b62607905e --- /dev/null +++ b/examples/svelte-ts/src/routes/date-picker-range.svelte @@ -0,0 +1,139 @@ + + +
+
+ +
+

{`Visible range: ${api.visibleRangeText.formatted}`}

+ + +
Selected: {api.valueAsString.join(", ") ?? "-"}
+
Focused: {api.focusedValueAsString}
+
+ +
+ + + + +
+ +
+
+
+ + + +
+ +
+
+ + + + {api.visibleRangeText.start} - {api.visibleRangeText.end} + + + +
+ +
+ + + + {#each api.weekDays as day, i (i)} + + {/each} + + + + {#each api.weeks as week, i (i)} + + {#each week as value, i (i)} + + {/each} + + {/each} + +
+ {day.narrow} +
+
{value.day}
+
+ + + + + {#each api.weekDays as day, i (i)} + + {/each} + + + + {#each offset.weeks as week, i (i)} + + {#each week as value, i (i)} + + {/each} + + {/each} + +
+ {day.narrow} +
+
+ {value.day} +
+
+ +
+ Presets + + + + + +
+
+
+
+
+
+ + + +