Reputation: 129
<input kendo-time-picker
name="ArriveDateTime"
class="form-control"
k-format="'hh:mm tt'"
k-parse-formats="['hh:mm tt']"
k-ng-model="technician.ArriveDateTime"
k-ng-disabled="!technician.IsLocked"
ng-blur="Actions.OnChangeTime()"/>
I want to use ng-blur
on specific conditions.
I have added variable in controller named as $scope.Variables.isFormSubmitted
which may be true or false.I want to call action on blur only if $scope.FormSubmitted
is true.
So how can I check the condition first and then use ng-blur
?
Thanks in advance!!!!
Upvotes: 0
Views: 3220
Reputation: 5217
Include condition inside ng-blur
ng-blur="Variables.isFormSubmitted ? Actions.OnChangeTime(): doSomethingElseOr keepEmpty()"
Upvotes: 1
Reputation: 9533
Just rewrite the expression like this:
ng-blur="Variables.isFormSubmitted && Actions.OnChangeTime()"
Upvotes: 2