Skip to content

Commit 9892bbd

Browse files
committed
Update docs for Carbon time-picker
1 parent 73a2d28 commit 9892bbd

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

packages/react-renderer-demo/src/doc-components/examples-texts/carbon/carbon-time-picker.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,22 @@ This component also accepts all other original props, please see [here](https://
99

1010
### Timezone
1111

12-
Object of `value`, `label`. Extends [SelectItem component](https://react.carbondesignsystem.com/?path=/story/select--default).
12+
Extends [SelectItem component](https://react.carbondesignsystem.com/?path=/story/select--default).
13+
14+
|Option|Description|
15+
|-----|-----------|
16+
|label|A label of the timezone|
17+
|value|A value of the timezone used in `new Date('... ${value}')`|
18+
|showAs|Timezone that will be used to convert the value `value.toLocaleTimeString(..., { ..., timeZone: showsAs })`. Supported timezones can be found [here](https://cloud.google.com/dataprep/docs/html/Supported-Time-Zone-Values_66194188).|
19+
20+
#### value and showAs relationship
21+
22+
To make this component work, please provide corresponding `showAs` for each timezone.
23+
24+
```jsx
25+
{
26+
label: 'PST',
27+
value: 'PST',
28+
showsAs: 'US/Eastern'
29+
}
30+
```

0 commit comments

Comments
 (0)