0.2.12 • Published 6 years ago

@govuk-react/date-input v0.2.12

Weekly downloads
18
License
MIT
Repository
-
Last release
6 years ago

DateInput

Import

  import DateInput from '@govuk-react/date-input';

Usage

Simple

<DateInput>What is your date of birth?</DateInput>

Date with hint text

<DateInput hintText="For example, 31 03 1980">
  What is your date of birth?
</DateInput>

Date with hint text & error

<DateInput
  hintText="For example, 31 03 1980"
  errorText="Error message goes here"
>
  What is your date of birth?
</DateInput>

With custom input name props

<DateInput inputNames={{ day: 'dayInputName' }} hintText="For example, 31 03 1980">
  What is your date of birth?
</DateInput>

References:

Properties

PropRequiredDefaultTypeDescription
childrentrue | node
errorTextundefinedstringError text
hintTextundefinedstringOptional hint text
inputNames{ day: 'dateInputDay', month: 'dateInputMonth', year: 'dateInputYear', }shapeobject ObjectInput name attributes
0.2.12

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.4

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.28

6 years ago

0.1.27

6 years ago

0.1.26

6 years ago

0.1.25

6 years ago

0.1.24

6 years ago

0.1.23

6 years ago

0.1.22

6 years ago

0.1.21

6 years ago

0.1.19

6 years ago