react-day-select
v1.0.3
Published
[![npm](https://img.shields.io/npm/v/react-day-select.svg)](https://www.npmjs.com/package/react-day-select) ![downloads](https://img.shields.io/npm/dt/react-day-select.svg)
Downloads
151
Maintainers
Readme
React-Date-Select
A simple and reusable Datepicker component for React (Demo)
Installation
The package can be installed via npm:
npm i react-day-select --save
Or via yarn:
yarn add react-day-select
Usage
Here's an example of basic usage:
import React, { useState } from 'react';
import DatePicker from 'react-day-select';
function MyDatePicker() {
return (
<div>
<DatePicker
bgColor='#435EBE'
onChange={(e)=>console.log(e)}
format="MM-DD-YYYY"
/>
</div>
);
}
| Prop name | Description | Default value | Example values | | --------- | ---------------------------------- | -------------- | -------------------------------- | | bgColor | background color of head possition | #2b7479 | 'red, 'green', '#2b7479' etc. | | onChange | Tigger when a day is selecte | empty | August-05-1993 | | format | format of the output | August 05 1993 | MM-DD-YYYY mm-dd-yyyy DD-MM-YYYY | | | | | |
License
The MIT License.
Author
Thank you
Thank you to all Please save Water and River