Guest User

Untitled

a guest
Apr 24th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. <input name="pickerFromDate" date-time ng-model="model[options.key]" id="pickerFromDate" min-view="month" class="edb-input input-group-input"
  2. placeholder="{{to.placeholder}}" max-date="maxDate" date-change="changeMinValue" format="MMM DD, YYYY" validation="required"
  3. watch-direct-changes="true" />
  4.  
  5. <button type="button" class="btn btn-default" ng-click="setFocus($event);">
  6. <i class="fa fa-calendar"></i>
  7. </button>
  8.  
  9. $scope.setFocus = function(data) {
  10. let input = $(data.target).closest('.cv-form-section').find('input');
  11. input.click();
  12. };
  13.  
  14. Error: [$rootScope:inprog] $apply already in progress
  15.  
  16. $scope.setFocus = function(data) {
  17. let input = $(data.target).closest('.cv-form-section').find('input');
  18. $timeout(function(){
  19. input.click();
  20. })
  21. };
Add Comment
Please, Sign In to add comment