angular-utc-datepicker
v2.2.4
Published
A simple Angular datepicker component that exclusively uses UTC
Downloads
96
Maintainers
Readme
Angular UTC Datepicker
A simple Angular datepicker component that exclusively uses UTC.
Install
npm install --save angular-utc-datepicker
Dependencies
- Angular >= 2
- MomentJS
- Font Awesome
How to use
- Import into app module:
import { UtcDatepickerModule } from 'angular-utc-datepicker';
format
option, for formatting date (and time, if necessary); defaults to'YYYY-MM-DD'
. Uses Moment formatting.button
option, for showing/hiding a button which opens the calendar popupbuttonPosition
option, possible values arebefore
andafter
(defaults toafter
)dateChange
event for handling when the input text is updated or when a date is selected from the calendar popup
Examples
<utc-datepicker [date]="myDate" (dateChange)="onDateChange($event)"></utc-datepicker>
<utc-datepicker [date]="myDate" [button]="true" (dateChange)="onDateChange($event)"></utc-datepicker>
<utc-datepicker [date]="myDate" [button]="true" buttonPosition="before" format="MM/DD/YYYY HH:mm:ss" (dateChange)="onDateChange($event)"></utc-datepicker>