Skip to content

Commit

Permalink
fix: removed todos
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideMininni-Fincons committed Dec 12, 2023
1 parent 0517260 commit 16d1912
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 22 deletions.
6 changes: 1 addition & 5 deletions src/components/datepicker/datepicker/datepicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
16 changes: 8 additions & 8 deletions src/components/datepicker/datepicker/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions src/components/time-input/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 1 addition & 5 deletions src/components/time-input/time-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 16d1912

Please sign in to comment.