You can use $pristine of FormController to identify user interaction in field2. More info: https://docs.angularjs.org/api/ng/type/form.FormController
Take a look at my plunk to see how it works: http://plnkr.co/edit/xitWoXPyKpw34uXq0U4w?p=preview 2014. június 17., kedd 15:52:44 UTC+2 időpontban Jonathan Matthew Beck a következőt írta: > > We have 2 datepicker fields. Is there an Angular way to set the second > one equal to the first as soon as the User sets the first? Then once > they've both been set, break this binding? > > <h6 class="lighter smaller blue > form-label-lri"> > From Date: > </h6> > <input date-picker-directive > class="input-small-lri" filter-field="field" > type="text" > date-field-numb="1" > > data-ng-model="field.selectedDate1"/> > <h6 class="lighter smaller blue > form-label-lri"> > To Date: > </h6> > <input date-picker-directive > class="input-small-lri" filter-field="field" > type="text" > date-field-numb="2" > > data-ng-model="field.selectedDate2"/> > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
