Advertisement
Guest User

Untitled

a guest
Aug 20th, 2014
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. <input production-qty type="text" class="input-mini" maxlength="3" ng-model="day.qtyA" ui-event="{ blur : 'updateProduction(day)' }" ng-disabled="day.type=='H'">
  2.  
  3. <input production-qty type="text" maxlength="3" ng-model="qty1">
  4.  
  5. .directive('numeric', function() {
  6. return function(scope, element, attrs) {
  7.  
  8. $(element[0]).numericInput({ allowFloat: true });
  9.  
  10. };
  11. })
  12.  
  13. <input type="text" numeric />
  14.  
  15. $scope.blockNonNumber = function (val, field){
  16.  
  17. $scope[field] = val.toString().replace(/[^0-9]/g, '');
  18.  
  19. }
  20.  
  21. <input type="text" ng-model="price" ng-change="blockNonNumber(price, 'price')" pattern="[0-99]">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement