ngx-date-time-picker
Angular 5 Date-time picker
New
*bug fixes
Installation
npm install ngx-date-time-picker --save
Dependencies
- Moment.js
- FormsModule
Plugin Usage
You can use this in the following manner.
- Import the package Module as
;
Then in component file use the date-time-picker as follows:
ngx-date-time-picker ="date" ="getStartDate($event)" ="{timePicker: false}" ="'MM/DD/YYYY'"/ngx-date-time-picker
- You can now define
dateTimeFormat
[selectedDateTime]
takes input date
defined in the component.ts file as:
date: string; constructor
(getData)
will provide the formatted date as $event
.
Plugin options
Right now there are only two options to the plugin:
Default options
this.options =
If you need datePicker only then pass timePicker: false
or vice-versa.
I will soon be updating the plugin with more options.