I'm having a problem formatting a input text in the standard hour format ("HH:mm") as the client types. Also I must validate if the arrival time is not greater than departure time. Here is some sample:
<table>
<tr><td>Arrival: <input type="text" ng-model="item.arrival" name="arrival">{{item.arrival | date: 'HH:mm'}}</td> //It doesn't work. The code doesn't force the formatting upon typing(the ":") and also it allows more than 4 characters
<tr><td>Departure: <input type="text" ng-model="item.departure" name="departure">{{item.departure | date: 'HH:mm'}}</td></tr> //I must check if the value defined in arrival isn't greater than departure time.
</table>
Can someone please show some piece of code that deals with this? I'm more of a backend dev, I googled some but couldn't find much. Any help will be much appreciated.
inputelements won't affect theng-modelor theinputcontrol, they will only affect that specific rendering of the data.