diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index 23d52d7b..64fc37f5 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -1051,20 +1051,20 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :------------- | :--------------- | :------- | :---------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------- | -| valueTo | let | Yes | string | "" | Specify the date picker end date value (to)
Only works with the "range" date picker type | -| valueFrom | let | Yes | string | "" | Specify the date picker start date value (from)
Only works with the "range" date picker type | -| value | let | Yes | number | string | "" | Specify the date picker input value | -| datePickerType | let | No | "simple" | "single" | "range" | "simple" | Specify the date picker type | -| dateFormat | let | No | string | "m/d/Y" | Specify the date format | -| maxDate | let | No | null | string | Date | null | Specify the maximum date | -| minDate | let | No | null | string | Date | null | Specify the minimum date | -| locale | let | No | string | "en" | Specify the locale | -| short | let | No | boolean | false | Set to `true` to use the short variant | -| light | let | No | boolean | false | Set to `true` to enable the light variant | -| id | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the date picker element | -| flatpickrProps | let | No | import("flatpickr/dist/types/options").Options | {} | Override the options passed to the Flatpickr instance
https://flatpickr.js.org/options | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :------------- | :--------------- | :------- | :--------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------- | +| valueTo | let | Yes | string | "" | Specify the date picker end date value (to)
Only works with the "range" date picker type | +| valueFrom | let | Yes | string | "" | Specify the date picker start date value (from)
Only works with the "range" date picker type | +| value | let | Yes | number | string | "" | Specify the date picker input value | +| datePickerType | let | No | "simple" | "single" | "range" | "simple" | Specify the date picker type | +| dateFormat | let | No | string | "m/d/Y" | Specify the date format | +| maxDate | let | No | null | string | Date | null | Specify the maximum date | +| minDate | let | No | null | string | Date | null | Specify the minimum date | +| locale | let | No | import("flatpickr/dist/types/locale").CustomLocale | import("flatpickr/dist/types/locale").key | "en" | Specify the locale | +| short | let | No | boolean | false | Set to `true` to use the short variant | +| light | let | No | boolean | false | Set to `true` to enable the light variant | +| id | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the date picker element | +| flatpickrProps | let | No | import("flatpickr/dist/types/options").Options | {} | Override the options passed to the Flatpickr instance
https://flatpickr.js.org/options | ### Slots diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index 3c149a57..e3dbf224 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -2659,7 +2659,7 @@ "name": "locale", "kind": "let", "description": "Specify the locale", - "type": "string", + "type": "import(\"flatpickr/dist/types/locale\").CustomLocale | import(\"flatpickr/dist/types/locale\").key", "value": "\"en\"", "isFunction": false, "isFunctionDeclaration": false, diff --git a/src/DatePicker/DatePicker.svelte b/src/DatePicker/DatePicker.svelte index 41edfb98..8e7ca595 100644 --- a/src/DatePicker/DatePicker.svelte +++ b/src/DatePicker/DatePicker.svelte @@ -44,7 +44,10 @@ */ export let minDate = null; - /** Specify the locale */ + /** + * Specify the locale + * @type {import("flatpickr/dist/types/locale").CustomLocale | import("flatpickr/dist/types/locale").key} + */ export let locale = "en"; /** Set to `true` to use the short variant */ diff --git a/tests/DatePicker.test.svelte b/tests/DatePicker.test.svelte index f6522b24..3e99991c 100644 --- a/tests/DatePicker.test.svelte +++ b/tests/DatePicker.test.svelte @@ -1,8 +1,10 @@