diff --git a/src/components/datepicker/datepicker/datepicker.ts b/src/components/datepicker/datepicker/datepicker.ts index 7b2df8b946..a98859436c 100644 --- a/src/components/datepicker/datepicker/datepicker.ts +++ b/src/components/datepicker/datepicker/datepicker.ts @@ -198,11 +198,7 @@ export class SbbDatepickerElement extends LitElement { /** Reference of the native input connected to the datepicker. */ @property() public input?: string | HTMLElement; - /** - * Formats the current input's value as date. - * TODO: in the readme.md, the `attribute: false` options is not evaluated. - * This will be fixed in issue #2246. - */ + /** Formats the current input's value as date. */ @property({ attribute: false }) public set valueAsDate(date: SbbDateLike) { const parsedDate = date instanceof Date ? date : new Date(date); diff --git a/src/components/datepicker/datepicker/readme.md b/src/components/datepicker/datepicker/readme.md index 725b7ef76c..64254e97c7 100644 --- a/src/components/datepicker/datepicker/readme.md +++ b/src/components/datepicker/datepicker/readme.md @@ -104,14 +104,14 @@ This is helpful if you need a specific state of the component. ## Properties -| Name | Attribute | Privacy | Type | Default | Description | -| ------------- | --------------- | ------- | --------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `wide` | `wide` | public | `boolean` | `false` | If set to true, two months are displayed. | -| `dateFilter` | `date-filter` | public | `(date: Date \| null) => boolean` | | A function used to filter out dates. | -| `dateParser` | `date-parser` | public | `(value: string) => Date \| undefined \| undefined` | | A function used to parse string value into dates. | -| `format` | `format` | public | `(date: Date) => string \| undefined` | | A function used to format dates into the preferred string format. | -| `input` | `input` | public | `string \| HTMLElement \| undefined` | | Reference of the native input connected to the datepicker. | -| `valueAsDate` | `value-as-date` | public | `Date \| undefined` | | Formats the current input's value as date. TODO: in the readme.md, the `attribute: false` options is not evaluated. This will be fixed in issue #2246. | +| Name | Attribute | Privacy | Type | Default | Description | +| ------------- | ------------- | ------- | --------------------------------------------------- | ------- | ----------------------------------------------------------------- | +| `wide` | `wide` | public | `boolean` | `false` | If set to true, two months are displayed. | +| `dateFilter` | `date-filter` | public | `(date: Date \| null) => boolean` | | A function used to filter out dates. | +| `dateParser` | `date-parser` | public | `(value: string) => Date \| undefined \| undefined` | | A function used to parse string value into dates. | +| `format` | `format` | public | `(date: Date) => string \| undefined` | | A function used to format dates into the preferred string format. | +| `input` | `input` | public | `string \| HTMLElement \| undefined` | | Reference of the native input connected to the datepicker. | +| `valueAsDate` | - | public | `Date \| undefined` | | Formats the current input's value as date. | ## Events diff --git a/src/components/time-input/readme.md b/src/components/time-input/readme.md index 165d1f046b..d122b221fa 100644 --- a/src/components/time-input/readme.md +++ b/src/components/time-input/readme.md @@ -59,10 +59,10 @@ Whenever the validation state changes (e.g., a valid value becomes invalid or vi ## Properties -| Name | Attribute | Privacy | Type | Default | Description | -| ------------- | --------------- | ------- | ----------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `input` | `input` | public | `string \| HTMLElement` | | Reference of the native input connected to the datepicker. | -| `valueAsDate` | `value-as-date` | public | `Date \| null` | | Formats the current input's value as date. TODO: in the readme.md, the `attribute: false` options is not evaluated. This will be fixed in issue #2246. | +| Name | Attribute | Privacy | Type | Default | Description | +| ------------- | --------- | ------- | ----------------------- | ------- | ---------------------------------------------------------- | +| `input` | `input` | public | `string \| HTMLElement` | | Reference of the native input connected to the datepicker. | +| `valueAsDate` | - | public | `Date \| null` | | Formats the current input's value as date. | ## Events diff --git a/src/components/time-input/time-input.ts b/src/components/time-input/time-input.ts index e2a91306f1..4225fa9d3a 100644 --- a/src/components/time-input/time-input.ts +++ b/src/components/time-input/time-input.ts @@ -44,11 +44,7 @@ export class SbbTimeInputElement extends LitElement { } private _input: string | HTMLElement; - /** - * Formats the current input's value as date. - * TODO: in the readme.md, the `attribute: false` options is not evaluated. - * This will be fixed in issue #2246. - */ + /** Formats the current input's value as date. */ @property({ attribute: false }) public set valueAsDate(date: SbbDateLike) { if (!date || !this._inputElement) {