0.7.0 • Published 17 days ago

@blaze-react/date-time-input v0.7.0

Weekly downloads
310
License
ISC
Repository
-
Last release
17 days ago

Description

Datepicker tools that wraps react-datepicker.

Note about importing

This component requires its consumers to manually import the third-party library's CSS

import "react-datepicker/dist/react-datepicker.css";

Usage

  • Required
<DateTimeInput
  label="Date Time input required"
  onChange={({ event, value }) => {}}
  type="dateTime"
  modifier="full-width"
  validationMessage="Date Time is required"
  error
  required
/>
  • Disabled
<DateTimeInput
  label="Date Time input disabled"
  onChange={({ event, value }) => {}}
  type="dateTime"
  modifier="full-width"
  validationMessage="Date Time is disabled"
  error
  disabled
/>
  • Pick only date
<DateTimeInput
  label="Date input"
  onChange={({ event, value }) => {}}
  type="date"
  modifier="full-width"
/>
  • Pick only time
<DateTimeInput
  label="Date input"
  onChange={({ event, value }) => {}}
  type="time"
  modifier="full-width"
/>

API

DateTimeInput can receive a number of props as follow:
NAMETYPEDEFAULT
labelStringempty
type'dateTime', 'date', 'time'dateTime
valueStringempty
validationMessageStringThis field is required
disabledBooleanfalse
requiredBooleanfalse
errorBooleanfalse
onChangeFunction() => {}

onChange events

The raw onChange events are inconsistent from the underlying component and when using the today button so the component makes sure to set the the following props on an event.target

  • name: uses the component id prop
  • value: the date from the event
0.8.0-alpha.33

17 days ago

0.8.0-alpha.35

17 days ago

0.8.0-alpha.31

17 days ago

0.8.0-alpha.26

2 months ago

0.8.0-alpha.24

2 months ago

0.8.0-alpha.23

2 months ago

0.8.0-alpha.21

2 months ago

0.8.0-alpha.14

2 months ago

0.8.0-alpha.16

2 months ago

0.8.0-alpha.11

2 months ago

0.8.0-alpha.10

2 months ago

0.8.0-alpha.13

2 months ago

0.8.0-alpha.19

2 months ago

0.8.0-alpha.18

2 months ago

0.8.0-alpha.20

2 months ago

0.8.0-alpha.9

2 months ago

0.8.0-alpha.7

2 months ago

0.8.0-alpha.6

3 months ago

0.8.0-alpha.2

3 months ago

0.8.0-alpha.1

3 months ago

0.8.0-alpha.4

3 months ago

0.8.0-alpha.3

3 months ago

0.8.0-alpha.0

3 months ago

0.6.2-alpha.0

3 months ago

0.7.0

6 months ago

0.6.5

8 months ago

0.6.4

9 months ago

0.6.2

9 months ago

0.6.1

10 months ago

0.6.0

10 months ago