# date-time-selector

> React / Bootstrap 4 Date Time Selector

Latest version **1.0.33** (published 2017-12-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install date-time-selector
pnpm add date-time-selector
yarn add date-time-selector
bun add date-time-selector
```

## 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.33 |
| Published | 2017-12-13 |
| First published | 2017-11-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | unifymonitor |
| Maintainers | luke-unifymonitor |

## Links

- npm: https://www.npmjs.com/package/date-time-selector
- Repository: https://github.com/unifymonitor/date-time-selector
- Homepage: https://github.com/unifymonitor/date-time-selector#readme
- Issues: https://github.com/unifymonitor/date-time-selector/issues
- npm.io page: https://npm.io/package/date-time-selector

## Dependencies (7)

- [react](https://npm.io/package/react.md) ^16.1.1
- [moment](https://npm.io/package/moment.md) ^2.19.1
- [react-dom](https://npm.io/package/react-dom.md) ^16.1.1
- [prop-types](https://npm.io/package/prop-types.md) 15.5.8
- [reactstrap](https://npm.io/package/reactstrap.md) next
- [date-time-parser](https://npm.io/package/date-time-parser.md) 1.0.3
- [react-transition-group](https://npm.io/package/react-transition-group.md) ^2.2.1

## Recent versions

- 1.0.33 (latest) — 2017-12-13
- 1.0.32 — 2017-12-13
- 1.0.31 — 2017-11-23
- 1.0.30 — 2017-11-22
- 1.0.29 — 2017-11-21
- 1.0.28 — 2017-11-21
- 1.0.27 — 2017-11-21
- 1.0.26 — 2017-11-21
- 1.0.24 — 2017-11-21
- 1.0.23 — 2017-11-20
- 1.0.22 — 2017-11-20
- 1.0.21 — 2017-11-15
- 1.0.19 — 2017-11-15
- 1.0.18 — 2017-11-15
- 1.0.17 — 2017-11-14
- … 22 more at https://npm.io/package/date-time-selector/versions

## README

# date-time-selector

A(nother) date time selector.

This one...

- Is a React Component.
- Makes use of out-of-the-box Bootstrap 4 css classes for styling.
- Uses icons from [fontawesome](http://fontawesome.io/icons/ "Font Awesome Homepage")

All internal date manipulation is achieved using [Moment.js](https://momentjs.com/docs/#/parsing/ "Moment.js Homepage")

The component renders an [input-group](https://getbootstrap.com/docs/4.0/components/input-group/)

## Demo

https://codesandbox.io/s/881mmkvlwl

## Getting Started
### Install

#### npm
`npm add date-time-selector`

#### yarn
`yarn add date-time-selector`

## Usage


### Import

`import DateTimeSelector from 'date-time-selector'`

### JSX

`<DateTimeSelector> `

`<DateTimeSelector onSelected={this.handleSelected} disableTime={true} format='L' default={moment()} />`

## Props

| Prop | Type | Required | Description | Default |
| :--- | :--- | :---: | :--- | :--- |
| `default` | Object | | A moment.js object.  This will be the default value selected in the selector |  |
| `onSelected` | Function | | Will be called when a date is submitted. The selected moment is the only argument. Can be null. | |
| `format` | String | | [moment.js format string](https://momentjs.com/docs/#/displaying/format/). | 'L LTS' |
| `disableTime` | Boolean | | Set it to `true` if you'd like to hide the time inputs. | false |

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