0.2.12 • Published 7 years ago

@govuk-react/date-input v0.2.12

Weekly downloads
18
License
MIT
Repository
-
Last release
7 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

7 years ago

0.2.9

7 years ago

0.2.8

7 years ago

0.2.7

7 years ago

0.2.6

7 years ago

0.2.4

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.28

7 years ago

0.1.27

7 years ago

0.1.26

7 years ago

0.1.25

7 years ago

0.1.24

7 years ago

0.1.23

7 years ago

0.1.22

7 years ago

0.1.21

7 years ago

0.1.19

7 years ago