Ionic form validation (dates)


On my form, I have two dates. These dates are sent by a PHP-script to my database. The first date is the startdate, the second one is the enddate. How can I check (validate) if the enddate is greater than the startdate? Can I do this in HTML or should I do this in my controller?



You can use ngMin:

<input type="date" data-ng-model="startdate">
<input type="date" data-ng-model="enddate" data-ng-min="startdate">