Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

react-date-input


Date Input UI component for React optimized for i18n and a11y.

Screenshots

locale DateInput MonthInput
en DateInputEn MonthInputEn
es DateInputEs MonthInputEs
de DateInputDe MonthInputDe
zh DateInputZh MonthInputZh

Features

  • I18n support
  • A11y support
  • Style unoppinionated (no style provided)
  • Supports IE9, IE9+, Chrome, Firefox & Safari

Install

npm install --save react-date-input

Usage

import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import {DateInput, MonthInput} from 'react-date-input';

class App extends Component {
  render() {
    return (
      <form>
        <label>
          Date of birth:
          <DateInput />
        </label>
        <label>
          Month and year of establishment:
          <MonthInput />
        </label>
      </form>
    );
  }
}

ReactDOM.render(
    <App />,
    document.getElementById('container')
);

API

DateInput & MonthInput

Properties

Name Type Default Description
defaultValue date null Set initial value of the date input.
value date null Set current value of the date input.
onChange function Called for each valid date change, taking one argument date

Development

npm install
npm run storybook

Example

npm start and then go to http://localhost:9001

Online examples: TBD

Test Case

TBD

License

react-date-input is released under the MIT license © Rafael Xavier de Souza.

About

Date Input UI component for React optimized for i18n and a11y

Resources

License

Packages

No packages published
You can’t perform that action at this time.