Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

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)