Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <uib-tab index="5" heading="{{tabs[5].title}}" select="changeCheck($event)">
- <ng-form name="{{tabs[5].form}}">
- <div class="col-md-9">
- ...
- <div class="col-md-6">
- <h4>Add Followup</h4>
- <div class="form-group">
- <label for="addFollowupDate" class="control-label">Date:</label>
- <div class="input-group">
- <input type="text" id="addFollowupDate"
- class="form-control"
- uib-datepicker-popup="{{format}}"
- ng-required="true"
- ng-model="newFollowup.date"
- is-open="addFollowupPopup.opened"
- datepicker-options="dateOptions"
- close-text="Close"
- alt-input-formats="altInputFormats" />
- <span class="input-group-btn">
- <button type="button" class="btn btn-default" ng-click="openAddFollowupPopup()"><i class="fa fa-calendar"></i></button>
- </span>
- <div class="help-block" ng-messages="followupsForm.newFollowup.date.$error" ng-if="followupsForm.newFollowup.date.$invalid && followupsForm.newFollowup.date.$touched">
- <div ng-message="required">This field is required</div>
- </div>
- </div>
- </div>
- $scope.followupsForm = $('ng-form[name="followupsForm"]').data('$formController');
- if ($scope.followupsForm.$invalid) {
- angular.forEach($scope.followupsForm.$error, function (formErrorField) {
- angular.forEach(formErrorField, function (errorField) {
- errorField.$setTouched(); // by setting to touched, the relevant message will display if the field is invalid.
- });
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement