Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/sonjoydatta/pick-datetime-react

An NPM package for picking date and time in your React application.
https://github.com/sonjoydatta/pick-datetime-react

datepicker react timepicker typescript

Last synced: about 2 months ago
JSON representation

An NPM package for picking date and time in your React application.

Awesome Lists containing this project

README

        

# pick-datetime-react

A simple and reusable date-time picker component for React.

[![version][version-badge]][package]
[![MIT License][license-badge]][license]
[![🚀 Publish][workflow-badge]][workflow]

## Installation

Install via NPM:

```
npm install pick-datetime-react --save
```

or by using Yarn:

```
yarn add pick-datetime-react
```

## Examples

For datepicker:

```jsx
console.log(date)}
// message={{ value: 'Please select a valid date' }}
/>
```

![][datepicker-image]

For timepicker:

```jsx
const now = new Date();

console.log(time)}
// message={{ value: 'Please select a valid time' }}
/>;
```

![][timepicker-image]

## License

Licensed under MIT license, see [LICENSE][license] for the full license.

[npm]: https://www.npmjs.com
[node]: https://nodejs.org
[package]: https://www.npmjs.com/package/pick-datetime-react
[version-badge]: https://img.shields.io/npm/v/pick-datetime-react
[license-badge]: https://img.shields.io/npm/l/pick-datetime-react
[license]: https://github.com/sonjoydatta/pick-datetime-react/blob/main/LICENSE
[workflow-badge]: https://github.com/sonjoydatta/pick-datetime-react/actions/workflows/publish.yml/badge.svg
[workflow]: https://github.com/sonjoydatta/pick-datetime-react/actions/workflows/publish.yml
[datepicker-image]: https://i.ibb.co/jGrXZSV/datepicker.png
[timepicker-image]: https://i.ibb.co/Vt5L1HC/timepicker.png