Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bdbose/react-dater
React date picker
https://github.com/bdbose/react-dater
library react
Last synced: about 6 hours ago
JSON representation
React date picker
- Host: GitHub
- URL: https://github.com/bdbose/react-dater
- Owner: bdbose
- Created: 2022-02-06T20:06:53.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-19T20:03:26.000Z (over 1 year ago)
- Last Synced: 2024-10-08T14:12:57.870Z (about 1 month ago)
- Topics: library, react
- Language: JavaScript
- Homepage: https://bdbose.github.io/react-dater/
- Size: 913 KB
- Stars: 14
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-responsive-calendar-picker
> Made with create-react-library
[![NPM](https://img.shields.io/npm/v/react-dater.svg)](https://www.npmjs.com/package/react-dater) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
## Install
```bash
npm install --save react-responsive-calendar-picker
```
## Usage
```jsx
import React, { Component } from 'react'
import { DatePicker } from 'react-responsive-calendar-picker'
import 'react-responsive-calendar-picker/dist/index.css'
export default const App = () => {
const [dates, setDates] = useState({
checkin: new Date('2022-03-28'),
checkout: new Date('2022-04-28')
})
const [open, setOpen] = useState(false)
return (
<>
800?false:true}
>
setOpen(!open)}>
{dates.checkin && dates.checkin.toDateString()} |{' '}
{dates.checkout && dates.checkout.toDateString()}
>
)
}
```
## License
MIT © [bdbose](https://github.com/bdbose)