ocproject-jn-date-picker-react
v0.1.7
Published
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). This is a date-picker library build using React and date-fns. This library is created only for academic purpose.
Downloads
3
Readme
OC Project : Date picker library
This project was bootstrapped with Create React App. This is a date-picker library build using React and date-fns. This library is created only for academic purpose.
Installation
The package can be installed via npm:
npm install ocproject-jn-date-picker-react
or via yarn:
yarn add ocproject-jn-date-picker-react
Example
In your React project, install the package then import to use the component
import React, { useState } from "react";
import DatePicker from "ocproject-jn-date-picker-react/dist/DatePicker";
const Example = () => {
const [selectedDate, setSelectedDate] = useState(new Date());
return (<DatePicker onDatePick={date => setSelectedDate(date)}/>)
};
License
This project is free of use