An input that display and edit a timespan in a user friendly manner but has a model value more easily usable by the js code.
It is editable using a regex as pattern recognition to know if the inputed text is parsable into some kind of duration. If
the pattern is invalid the binded value will be set to undefined. This allows the luid-timespan to be
compatible with required and ng-required.
Upon pressing enter or losing focus of the input, it will format the input into a more readable form. For example you enter
140 and press enter, the text will change to 02h20
Supports up and down key events and scroll event to increment/decrement the value the value.
ng-model : the variable to bind tong-change : events to launch when the value is updatedng-disabled : enable or disable the inputunit : 'hour' or 'minute', tells the directive that typing 10 in the input means 10 minutes or 10 hours.
The default is 'minute'step : when scrolling or pressing the up/down key, how many minutes you want to be added. The default is
5.
placeholder : placeholder to display when the input is empty.mode : to tell if you want the directive to give you a timespan or a moment.duration. Supported values: timespan (default) and moment.duration
<luid-timespan ng-model="myValue"></luid-timespan>