Skip to content

MandarinConLaBarba/react-datepicker

 
 

Repository files navigation

NOTE: This project is no longer actively maintained. If you would like to use it, go ahead, but there are better options available here:

React DatePicker Component

A fork of https://github.com/misino/react-datepicker.

  • CommonJS
  • Month Picker instead of individual year/day pickers
  • classNamePrefix property for style customization

Usage

Install in your project:

npm install react-datepicker-component

And then include via require():

 var React = require('react'),
   DatePicker = require('react-datepicker-component/DatePicker.jsx'),
   DatePickerInput = require('react-datepicker-component/DatePickerInput.jsx');
 
 React.renderComponent(
     <DatePicker date={new Date(2014, 0, 8)} />,
        document.getElementById('datepicker')
 );
 
 React.renderComponent(
     <DatePickerInput 
        classNamePrefix={"wide-datepicker"} 
        date={new Date(2012, 0, 4)} 
        beforeUpdate={formatDate} />,
        document.getElementById('datepicker-input')
 );

Then bundle with something that can package your stuff for the browser, like browserify.

Customize

You can change the css class prefix used by passing in the classNamePrefix property. See the example and stylus to see this in action.

About

Datepicker component for application using Facebook React

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.4%
  • Other 0.6%