Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/adibfirman/react-datepicker

⚛️ A React Datepicker Component
https://github.com/adibfirman/react-datepicker

react reactjs

Last synced: 3 months ago
JSON representation

⚛️ A React Datepicker Component

Awesome Lists containing this project

README

        

# React Datepicker Component

An awesome Datepicker for your React APP, built in with [Framer-motion](https://www.framer.com/api/motion/)



## Install `peerdepedencies`

```bash
$ npm i --save styled-components
# or
$ yarn add styled-components
```

## Installation

```bash
$ npm i --save @adibfirman/react-datepicker
# or
$ yarn add @adibfirman/react-datepicker
```

## Available Props

- `value`
- A date object, default value is `today`
- `onChange(date) => void`
- Function where the callback is selected date
- `customColor` an object which the value is one of these
- `selected_date`: `{ bgColor: string; textColor: string };`
- Default value is: `{ textColor: '#000', bgColor: '#fff' }`
- `date`: `{ bgColor: string; textColor: string };`
- Default value is: `{ textColor: '#000', bgColor: '#fff' }`
- `month`: `{ bgColor: string; textColor: string };`
- Default value is: `{ textColor: '#fff', bgColor: '#2196f3' }`
- `year`: `{ bgColor: string; textColor: string };`
- Default value is: `{ textColor: '#fff', bgColor: '#39373A' }`

## Usage

```jsx
import React from 'react';
import { Datepicker } from '@adibfirman/react-datepicker'

function MyApp() {
return (


Hello World




);
}
```

## Contribute & Help

- Fork and send Pull Requests are welcome
- Submit an issues
- A new feature requests

## License

This library is [MIT licensed](https://github.com/adibfirman/react-datepicker/blob/master/LICENSE)