Considering 3 dates : myDate1, myDate2, myDate3. I'd like to validate that myDate1 < myDate2 < myDate3
Dates are set by the date picker directive found in angular-ui.
Here is a plunker : http://plnkr.co/edit/FTcJNHxuv3RFtBCUw7Ck
I'm having difficulties founding the right way to do that. I'm using ui-validate but it looks like when a condition is evaluated to false, the model is set to undefined.
Edit : It turns out that model being set to undefined is normal Angular behaviour. However there is a bug in the ui-validate directive. I'll update this post once it's resolved. See : https://github.com/angular-ui/ui-utils/issues/25