# react-datepicker-ui

> Datepicker Component for React

Latest version **1.0.3** (published 2021-07-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-datepicker-ui
pnpm add react-datepicker-ui
yarn add react-datepicker-ui
bun add react-datepicker-ui
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2021-07-30 |
| First published | 2021-07-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 259.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | santhosh.korimi |
| Keywords | react, react-component, datepicker, calendar, date, react-datepicker, react-dates, dates, datepicker-input |

## Links

- npm: https://www.npmjs.com/package/react-datepicker-ui
- Repository: https://github.com/Santhosh1392/react-datepicker-ui
- Homepage: https://github.com/Santhosh1392/react-datepicker-ui#readme
- Issues: https://github.com/Santhosh1392/react-datepicker-ui/issues
- npm.io page: https://npm.io/package/react-datepicker-ui

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2021-07-30
- 1.0.2 — 2021-07-30
- 1.0.1 — 2021-07-30
- 1.0.0 — 2021-07-30

## README

# react-datepicker-ui

Date picker component for React

## How to Install

Make sure you have [Node.js](http://nodejs.org/) and NPM installed.

Dependencies for the packge is [moment]
```sh
npm install react-datepicker-ui moment
```

Or

```sh
yarn add react-datepicker-ui moment
```

## How to Use

```sh
import React from 'react'
import DatePickerInput from 'react-datepicker-ui'

const DatePicker = () => {
  const handleOnChange = (date) => {
    console.log('date', date)
  }

  return (
    <DatePickerInput
      onChange={handleOnChange}
    />
  )
}
```

## Demo

![Datepicker Demo](https://github.com/Santhosh1392/react-datepicker-ui/blob/main/demo/demo.gif)

Check out [Online Demo](https://korimi.in/projects) here.

```sh
import React from 'react'
import moment from 'moment'
import DatePickerInput from 'react-datepicker-ui'

const DatePickerDemo = () => {
  const handleOnChange = (date) => {
    console.log('date', date)
  }

  const minDate = moment()
  const maxDate = moment().add(1, 'M')
  return (
    <DatePickerInput
      onChange={handleOnChange}
      minDate={minDate}
      maxDate={maxDate}
      placeholder="DD/MM/YYYY"
      format="DD/MM/YYYY"
    />
  )
}
```

## Available PropTypes

| Prop Name    | Type     | Default Value | Description                                             |
| ------------ | -------- | ------------- | ------------------------------------------------------- |
| defaultValue | String   | ''            | Initial Value for datepicker                            |
| format       | String   | 'MM/DD/YYYY'  | Format of the date to be returned                       |
| minDate      | Date     |  null         | Disable dates before mentioned dates to select          |
| maxDate      | Date     |  null         | Disable dates after mentioned dates to select           |
| onChange     | Function | null          | Callback function to get the selected date              | 
| placeholder  | String   | 'MM/DD/YYYY'  | Placeholder to display on input                         |

---
_Source: https://npm.io/package/react-datepicker-ui · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
