Date Field

Live example


Properties

Name

Values

Default

id (required)

string

 

label (required)

string

 

value (required)

{
day: string;
month: string;
year: string;
}

 

onChange (required)

(date: DateFormat) => void

 

autoFocusNext

boolean

true

name

string | undefined

 

hint

ReactNode

 

error

ReactNode

 

optional

boolean

false

fullWidth

boolean

false

readOnly
(React Native should instead use the 'editable' property)

boolean

false

'data-testid'
(React Native should instead use the 'testID' property)

string | undefined

 

Native Properties

Name

Values

Default

title (required)

ReactNode

 

expanded

boolean

false

onToggle

CallableFunction

 

children

ReactNode

 


Composition

Date field composition 1
  1. Label text
  2. Hint text
  3. Input text
  4. Input border
Date field composition 2

 

Tokens

 

Text color

color.surface.onsurface

Hint text color

color.surface.onsurfacevariant

Input border color

color.input.border

Text font weight

font.family.bold

Hint text font weight

font.family.book

Text size

font.size.md

Text line height

font.lineheight.md

Padding

space.100 space.200

Input border width

border.width.md