npm.io
2.2.4 • Published 7 years ago

angular-utc-datepicker

Licence
MIT
Version
2.2.4
Deps
0
Size
116 kB
Vulns
0
Weekly
0

Angular UTC Datepicker

A simple Angular datepicker component that exclusively uses UTC.

Install

npm install --save angular-utc-datepicker

Dependencies

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 popup
  • buttonPosition option, possible values are before and after (defaults to after)
  • 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>

Keywords