A simple Angular 1.x datepicker directive that exclusively uses UTC.
- npm:
npm install --save ng-utc-datepicker - bower:
bower install --save ng-utc-datepicker
- Angular 1.x
- MomentJS
- Font Awesome
- Inject
'es.ngUtcDatepicker'into your app - Add
ng-utc-datepickerto aninputtag formatoption, for formatting date (and time, if necessary); defaults to'YYYY-MM-DD'. Uses Moment formatting.triggeroption, for triggering the calendar with an external element such as a button or icon. Must be an element ID.
https://ericsvendsen.github.io/ng-utc-datepicker/
<input ng-utc-datepicker ng-model="vm.date"/>
<span id="icon" class="fa fa-calendar"></span>
<input ng-utc-datepicker data-trigger="icon" ng-model="vm.date"/>
<input ng-utc-datepicker data-format="MM/DD/YYYY HH:mm:ss" ng-model="vm.date"/>