Use consistent date definitions

This commit is contained in:
Gregor Wassmann 2021-05-14 15:33:35 +02:00
commit ccd96b45b2
4 changed files with 21 additions and 21 deletions

View file

@ -1001,18 +1001,18 @@ None.
### Props
| Prop name | Kind | Reactive | Type | Default value | Description |
| :------------- | :--------------- | :------- | :--------------------------------------------------- | ------------------------------------------------ | --------------------------------------------- |
| value | <code>let</code> | Yes | <code>number &#124; string</code> | <code>""</code> | Specify the date picker input value |
| datePickerType | <code>let</code> | No | <code>"simple" &#124; "single" &#124; "range"</code> | <code>"simple"</code> | Specify the date picker type |
| appendTo | <code>let</code> | No | <code>HTMLElement</code> | -- | Specify the element to append the calendar to |
| dateFormat | <code>let</code> | No | <code>string</code> | <code>"m/d/Y"</code> | Specify the date format |
| maxDate | <code>let</code> | No | <code>null &#124; string &#124; Date</code> | <code>null</code> | Specify the maximum date |
| minDate | <code>let</code> | No | <code>null &#124; string &#124; Date</code> | <code>null</code> | Specify the minimum date |
| locale | <code>let</code> | No | <code>string</code> | <code>"en"</code> | Specify the locale |
| short | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to use the short variant |
| light | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the light variant |
| id | <code>let</code> | No | <code>string</code> | <code>"ccs-" + Math.random().toString(36)</code> | Set an id for the date picker element |
| Prop name | Kind | Reactive | Type | Default value | Description |
| :------------- | :--------------- | :------- | :-------------------------------------------------------- | ------------------------------------------------ | --------------------------------------------- |
| value | <code>let</code> | Yes | <code>number &#124; string &#124; Date</code> | <code>""</code> | Specify the date picker input value |
| datePickerType | <code>let</code> | No | <code>"simple" &#124; "single" &#124; "range"</code> | <code>"simple"</code> | Specify the date picker type |
| appendTo | <code>let</code> | No | <code>HTMLElement</code> | -- | Specify the element to append the calendar to |
| dateFormat | <code>let</code> | No | <code>string</code> | <code>"m/d/Y"</code> | Specify the date format |
| maxDate | <code>let</code> | No | <code>null &#124; number &#124; string &#124; Date</code> | <code>null</code> | Specify the maximum date |
| minDate | <code>let</code> | No | <code>null &#124; number &#124; string &#124; Date</code> | <code>null</code> | Specify the minimum date |
| locale | <code>let</code> | No | <code>string</code> | <code>"en"</code> | Specify the locale |
| short | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to use the short variant |
| light | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the light variant |
| id | <code>let</code> | No | <code>string</code> | <code>"ccs-" + Math.random().toString(36)</code> | Set an id for the date picker element |
### Slots

View file

@ -2262,7 +2262,7 @@
"name": "value",
"kind": "let",
"description": "Specify the date picker input value",
"type": "number | string",
"type": "number | string | Date",
"value": "\"\"",
"isFunction": false,
"constant": false,
@ -2291,7 +2291,7 @@
"name": "maxDate",
"kind": "let",
"description": "Specify the maximum date",
"type": "null | string | Date",
"type": "null | number | string | Date",
"value": "null",
"isFunction": false,
"constant": false,
@ -2301,7 +2301,7 @@
"name": "minDate",
"kind": "let",
"description": "Specify the minimum date",
"type": "null | string | Date",
"type": "null | number | string | Date",
"value": "null",
"isFunction": false,
"constant": false,

View file

@ -11,7 +11,7 @@
/**
* Specify the date picker input value
* @type {number | string}
* @type {number | string | Date}
*/
export let value = "";
@ -26,13 +26,13 @@
/**
* Specify the maximum date
* @type {null | string | Date}
* @type {null | number | string | Date}
*/
export let maxDate = null;
/**
* Specify the minimum date
* @type {null | string | Date}
* @type {null | number | string | Date}
*/
export let minDate = null;

View file

@ -13,7 +13,7 @@ export interface DatePickerProps
* Specify the date picker input value
* @default ""
*/
value?: number | string;
value?: number | string | Date;
/**
* Specify the element to append the calendar to
@ -30,13 +30,13 @@ export interface DatePickerProps
* Specify the maximum date
* @default null
*/
maxDate?: null | string | Date;
maxDate?: null | number | string | Date;
/**
* Specify the minimum date
* @default null
*/
minDate?: null | string | Date;
minDate?: null | number | string | Date;
/**
* Specify the locale