luid-moment

An input that display and edit a time, as the timepicker from angular ui bootstrap but plugged to a moment or a string.

Features

Supports min/max, binded to the $scope. If your min or max changes, the input is notified and will work accordingly. Feature not present for the ui bootstrap timepicker as of version 0.13.4.

Supports the change of day, meaning you can set the min to today 8AM and max to tomorrow 2 AM and the input will accept any time from 08:00 to 02:00.

Supports up and down key events and scroll event to increment/decrement the value.

Supports an format argument if you don't want to bind to a moment but to a string.

Supported arguments

Usage

<luid-moment ng-model="myValue"></luid-moment>
<luid-moment ng-model="myValue" format="'HH:mm:ss'"></luid-moment>

myValue in luid-moment (required) :

ng-invalid-{{key}}

myValue as it is in $scope : {{myValue}}

Number of time ng-change on the luid-moment has been called : {{updateCnt}}


myStr in luid-moment with format="'HH:mm:ss'" :

ng-invalid-{{key}}

myStr as it is in $scope: {{myStr}}


myValue2 bounded between "08:00" and "22:00" :

ng-invalid-{{key}}

myValue2 as it is in $scope : {{myValue2}}


myValue3 bounded between $scope.min (today 8 AM) and $scope.max (tomorrow 2 AM) :

ng-invalid-{{key}}

myValue3 as it is in $scope : {{myValue3}}