@hnordt/reax-date-inputdeprecated

Bootstrap Date Input component for React

Usage no npm install needed!

<script type="module">
  import hnordtReaxDateInput from 'https://cdn.skypack.dev/@hnordt/reax-date-input';
</script>

README

Reax Date Input

Bootstrap Date Input component for React

npm version

PropTypes

{
  name: PropTypes.string,
  value: PropTypes.string,
  min: PropTypes.string,
  max: PropTypes.string,
  step: PropTypes.oneOfType(PropTypes.string, PropTypes.number),
  autoFocus: PropTypes.bool,
  readOnly: PropTypes.bool,
  disabled: PropTypes.bool,
  onFocus: PropTypes.func,
  onChange: PropTypes.func,
  onBlur: PropTypes.func
}

Usage

npm install --save @hnordt/reax-date-input
import React from 'react';
import moment from 'moment';
import DateInput from '@hnordt/reax-date-input';

const Foo = () => (
  <DateInput
    value={moment().format('YYYY-MM-DD')}
    max={moment().format('YYYY-MM-DD')}
    onChange={event => console.log(event.target.value)} />
);

export default Foo;

Important: if you want to support browsers that hasn't native date input support you must include React DatePicker CSS in your project