# ngx-date-time-picker

> Angular 5 lightweight date/time/date-time picker

Latest version **1.1.6** (published 2019-05-21) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install ngx-date-time-picker
pnpm add ngx-date-time-picker
yarn add ngx-date-time-picker
bun add ngx-date-time-picker
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.6 |
| Published | 2019-05-21 |
| First published | 2017-12-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 13 |
| Unpacked size | 16.2 KB |
| Known vulnerabilities | 0 (+24 in 4 direct dependencies) |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Rajan Kumar |
| Maintainers | rajan471 |
| Keywords | date, time, picker |

## Links

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

## Dependencies (13)

- [rxjs](https://npm.io/package/rxjs.md) ^5.5.2
- [moment](https://npm.io/package/moment.md) ^2.19.3
- [core-js](https://npm.io/package/core-js.md) ^2.4.1
- [zone.js](https://npm.io/package/zone.js.md) ^0.8.14
- [@angular/core](https://npm.io/package/@angular/core.md) ^5.0.0
- [@types/moment](https://npm.io/package/@types/moment.md) ^2.13.0
- [@angular/forms](https://npm.io/package/@angular/forms.md) ^5.0.0
- [@angular/common](https://npm.io/package/@angular/common.md) ^5.0.0
- [@angular/router](https://npm.io/package/@angular/router.md) ^5.0.0
- [@angular/compiler](https://npm.io/package/@angular/compiler.md) ^5.0.0
- [@angular/animations](https://npm.io/package/@angular/animations.md) ^5.0.0
- [@angular/platform-browser](https://npm.io/package/@angular/platform-browser.md) ^5.0.0
- [@angular/platform-browser-dynamic](https://npm.io/package/@angular/platform-browser-dynamic.md) ^5.0.0

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 1.1.6 (latest) — 2019-05-21
- 1.1.5 — 2018-02-14
- 1.1.4 — 2017-12-27
- 1.1.2 — 2017-12-12
- 1.1.1 — 2017-12-07
- 1.1.0 — 2017-12-07
- 1.0.7 — 2017-12-07
- 1.0.6 — 2017-12-07
- 1.0.5 — 2017-12-07
- 1.0.4 — 2017-12-06
- 1.0.3 — 2017-12-06
- 1.0.2 — 2017-12-06
- 1.0.1 — 2017-12-06
- 1.0.0 — 2017-12-06

## README

# ngx-date-time-picker

Angular 5 Date-time picker

#### New 
*bug fixes

### Installation

```node
npm install ngx-date-time-picker --save
```

### Dependencies
- Moment.js
- FormsModule

### Plugin Usage

You can use this in the following manner. 

1. Import the package Module as
```ts
import { NgxDateTimePickerModule } from  'ngx-date-time-picker';
```

Then in component file use the date-time-picker as follows:
```ts
<ngx-date-time-picker [selectedDateTime]="date" (getData)="getStartDate($event)" [options]="{timePicker: false}" [dateTimeFormat]="'MM/DD/YYYY'"></ngx-date-time-picker>

```

- You can now define ```dateTimeFormat```

```[selectedDateTime]``` takes input ```date``` defined in the component.ts file as:

```ts
date: string;

constructor(){
    this.date = moment().format('DD/MM/YYYY'); //for date-picker
    // this.date = moment().format('hh:mmA');  //for time-picker
}
```
```(getData)``` will provide the formatted date as ```$event```.

### Plugin options

Right now there are only two options to the plugin:

#### Default options
```ts
this.options = {
    datePicker: true,
    timePicker: true
}
```

If you need datePicker only then pass ```timePicker: false``` or vice-versa.

I will soon be updating the plugin with more options.

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