Date picker
The following page documents visual specifications such as color, typography, structure, size, and AI presence.
Color
Date picker color
Element | Property | Color token |
---|---|---|
Label | text-color |
|
Field | background-color |
|
border-bottom |
| |
Field text | text-color |
|
Placeholder text | text-color |
|
Helper text | text-color |
|
Calendar icon | svg |
|
* Denotes a contextual color token that will change values based on the layer it is placed on.
![Default date picker input colors](/static/d0ceee95358c8d8806a7a158ede9f6ea/3cbba/date-picker-style-color-default.png)
![Fluid date picker input colors](/static/c6d787b904c11015398a9c66b3c147ef/3cbba/date-picker-style-color-fluid.png)
Interactive state color
State | Element | Property | Color token |
---|---|---|---|
Focus | Field | border |
|
Error | Field | border |
|
Error message | text-color |
| |
Error icon | svg |
| |
Warning | Warning message | text-color |
|
Warning icon | svg |
| |
Disabled | Label | text-color |
|
Field | background-color |
| |
Field text | text-color |
| |
Field (default) | border-bottom | transparent | |
Field (fluid) | border-bottom |
| |
Calendar icon | svg |
| |
Read-only | Label | text-color |
|
Field text (default) | text-color |
| |
Field (default) | background-color | transparent | |
Field text (fluid) | text-color |
| |
Field (fluid) | background-color |
| |
Chevron icon | svg |
|
* Denotes a contextual color token that will change values based on the layer it is placed on.
![Default date picker input states](/static/fdd583723c570041cd69690f97bb2889/3cbba/date-picker-style-states-default.png)
![Fluid date picker input states](/static/6c63eb03a795ca4dd7936bf9ed113008/3cbba/date-picker-style-states-fluid.png)
Examples of date picker input states
Calendar menu color
Element | Property | Color token |
---|---|---|
Calendar | background-color |
|
Calendar menu | box-shadow |
|
Today | text-color |
|
* Denotes a contextual color token that will change values based on the layer it is placed on.
![Date picker calendar color example](/static/0a0668c5253e7f26cc1766f3f8c049d6/3cbba/date-picker-style-color-calendar.png)
Example of a date picker calendar menu.
Interactive state color
State | Element | Property | Color token |
---|---|---|---|
Hover | Day | background-color |
|
Focus | Day | border |
|
Disabled | Day | text-color |
|
Selected | Day | text-color |
|
background-color |
| ||
In range | Day | text-color |
|
background-color |
| ||
End range | Day | text-color |
|
border |
| ||
Next month | Day | text-color |
|
* Denotes a contextual color token that will change values based on the layer it is placed on.
![Date picker calendar examples](/static/d49e115ee538cf6f68e3ecddfefdf445/3cbba/date-picker-style-1.png)
Example of a single date calendar picker (left) and a date range calendar picker (right).
Time picker color
The time picker is made up of text input and select input components.
Element | Property | Color token |
---|---|---|
Label | text-color |
|
Field | background-color |
|
border-bottom |
| |
dividers (fluid) |
| |
Field text | text-color |
|
Placeholder text | text-color |
|
Chevron icon | svg |
|
* Denotes a contextual color token that will change values based on the layer it is placed on.
![Default time picker input colors](/static/fb017eb705063a115e08b8bb193da2c6/3cbba/time-picker-style-color-default.png)
![Fluid time picker input colors](/static/e49243dcf9c4fc554cb3106bbc5264d1/3cbba/time-picker-style-color-fluid.png)
Interactive state color
The interactive state color example shown below is specificaly for text input. See the select input style tab for more details on select component interactive state colors.
State | Element | Property | Color token |
---|---|---|---|
Focus | Field | border |
|
Error | Field | border |
|
Error message | text-color |
| |
Error icon | svg |
| |
Warning | Warning message | text-color |
|
Warning icon | svg |
| |
Disabled | Label | text-color |
|
Field | background-color |
| |
Field text | text-color |
| |
Field (default) | border-bottom | transparent | |
Field (fluid) | border-bottom |
| |
Chevron icon | svg |
| |
Read-only | Label | text-color |
|
Field text (default) | text-color |
| |
Field (default) | background-color | transparent | |
Field text (fluid) | text-color |
| |
Field (fluid) | background-color |
| |
Chevron icon | svg |
|
* Denotes a contextual color token that will change values based on the layer it is placed on.
![Default time picker input states](/static/4addc11b677e4dbde09b936c66b5d5d2/3cbba/time-picker-style-states-default.png)
![Fluid time picker input states](/static/e2c14b4ea4bc9f038b1a2c32c69961f5/3cbba/time-picker-style-states-fluid.png)
Examples of time picker input states
Typography
Labels should be set in sentence case, with only the first word in a phrase and any proper nouns capitalized, and no more than three words.
Element | Font-size | Font-weight | Type token |
---|---|---|---|
Label | 12 / 0.75 | Regular / 400 |
|
Field text | 14 / 0.875 | Regular / 400 |
|
Helper text | 12 / 0.75 | Regular / 400 |
|
Error message | 12 / 0.75 | Regular / 400 |
|
Warning message | 12 / 0.75 | Regular / 400 |
|
Month and year | 14 / 0.875 | SemiBold / 600 |
|
Day | 14 / 0.875 | Regular / 400 |
|
Structure
Date picker input structure
Default input
The widths of the date inputs may vary based on the grid and layout.
Element | Property | px / rem | Spacing token |
---|---|---|---|
Label | margin-bottom | 8 / 0.5 |
|
Field | padding-left, padding-right | 16 / 1 |
|
border-bottom | 1px | – | |
Helper text | margin-top | 4 / .25 |
|
Calendar icon | height, width | 16 / 1 | – |
padding-left | 8 / 0.5 |
|
![Structure for date picker inputs](/static/dd377376b1f2219c71dcd47050bddc90/3cbba/date-picker-style-4.png)
Structure and spacing for default date picker inputs | px / rem
Fluid input
The widths of the date inputs may vary based on the grid and layout.
Element | Property | px / rem | Spacing token |
---|---|---|---|
Label | padding-bottom | 4 / 0.25 |
|
Field | height | 64 / 4 |
|
padding-left, padding-right | 16 / 1 |
| |
padding-top, padding-bottom | 13 / 0.8125 | – | |
border-bottom | 1px | – | |
Calendar icon | height, width | 16 / 1 | – |
padding-left | 8 / 0.5 |
| |
Focus | border | 2px | – |
Error | border | 2px | – |
![Structure for date picker inputs](/static/8ca1ff28a8b220524c9b0226ea90e844/3cbba/date-picker-style-4-fluid.png)
Structure and spacing for fluid date picker inputs | px / rem
Calendar menu structure
Element | Property | px / rem | Spacing token |
---|---|---|---|
Calendar menu | height | 336 / 21 | – |
width | 288 / 18 | – | |
padding-top, padding-right, padding-left | 4 / 0.25 |
| |
padding-bottom | 8 / 0.5 |
| |
Day | height, width | 40 / 2.5 | – |
Today: dot | height, width | 4 / 0.25 | – |
![Structure for date picker](/static/775302d2a2d212458c20a960ee6ec3b5/3cbba/date-picker-style-2.png)
Structure for date picker | px / rem
![Spacing for date picker](/static/17db0888e6eb0089f83a6c4be1577393/3cbba/date-picker-style-3.png)
Spacing for date picker | px / rem
Time picker structure
The time picker is a combination of a text input and select component. Refer to each component page for further details.
Default input
The widths of the time picker may vary based on the grid and layout.
Element | Property | px / rem | Spacing token |
---|---|---|---|
Label | padding-bottom | 8 / 0.5 |
|
Field | height | 40 / 2.5 | – |
padding-right, padding-left | 16 / 1 |
| |
Select | padding-right, padding-left | 16 / 1 |
|
![Structure for a time picker](/static/2df8fb546203b716e04087989c2ff408/3cbba/time-picker-style-1.png)
Structure and spacing for a time picker | px / rem
Fluid input
The width of each component in the fluid time picker is a percentage of the group. Time picker’s total width will vary based on the grid and layout
Element | Property | px / rem | Spacing token |
---|---|---|---|
Label | padding-bottom | 4 / 0.25 |
|
Field | height | 64 / 4 | – |
padding-right, padding-left | 16 / 1 |
| |
Divider | width | 1px | – |
Time input | width | 25% or 50% | – |
Clock select | width | 25% or 50% | – |
Timezone select | width | 50% | – |
![Structure for a time picker](/static/2da4b57dd4cdfe910c26f098f5c9b7e8/3cbba/time-picker-style-1-fluid-a.png)
Structure and spacing for a time picker | px / rem
![Structure for a time picker](/static/028cf0c3cabd82f337d755c81f43576d/3cbba/time-picker-style-1-fluid-b.png)
The width of each component in the fluid time picker is a percentage of the group.
Size
Default date picker input
Element | Size | Height px / rem |
---|---|---|
Field | Small (sm) | 32 / 2 |
Medium (md) | 40 / 2.5 | |
Large (lg) | 48 / 3 |
![Sizes for simple and single date calendar sizes](/static/95854d0bdd18d335284076c90c2564af/3cbba/date-picker-style-size.png)
Sizes for simple and single date calendar sizes | px / rem
Default time picker input
Element | Size | Height px / rem |
---|---|---|
Field | Small (sm) | 32 / 2 |
Medium (md) | 40 / 2.5 | |
Large (lg) | 48 / 3 |
![Sizes for simple and single date calendar sizes](/static/ce6fd0689ef494a7f869306d7a55497c/3cbba/time-picker-style-size.png)
Sizes for default style time picker input | px / rem
AI presence
The following are the unique styles applied to the components when the AI label is present. Unless specified, all other tokens in the components remain the same as the non-AI variants.
For more information on the AI style elements, see the Carbon for AI guidelines.
Element | Property | Token / Size |
---|---|---|
Linear-gradient | start |
|
stop |
| |
Field | border-bottom |
|
background color |
| |
AI label | size | mini |
* Denotes a contextual color token that will change values based on the layer it is placed on.
![Structure and spacing default date picker with AI](/static/5dfbcdc5ed5bc525703acca2f4b87d10/3cbba/date-picker-AI-default-style.png)
![Structure and spacing fluid date picker with AI](/static/aa13bf009d18f8d2a618df1924ff0c2a/3cbba/date-picker-AI-fluid-style.png)
Feedback
Help us improve this component by providing feedback, asking questions, and leaving any other comments on GitHub.