Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 600 Bytes

File metadata and controls

39 lines (29 loc) · 600 Bytes

React-datepick

Installation

This package can be installed with npm

npm install @tof28/react-datepicker

or yarn

yarn add @tof28/react-datepicker

Usage

  import DatePicker from '@tof28/react-datepicker';

  <DatePicker
    name='my-datepicker'
    selected={new Date()}
    onChange={myHandleChangeFunction}
  >

You can use selected prop to set default date.

Use onChange prop to add your own beavior. It will be triggered on a date selection and will receive an event with a target object.

  {
    target: {
      name,
      value,
    }
  }