1

Input type number is restrict by range . i tried lot of thing , i didn't

 _keyPress(event: any, EditField, field) { if (parseFloat(event.target.value) < 1 && event.keyCode != 46 && event.keyCode!= 8) { event.preventDefault(); } } 
2
  • Is it AngularJS (version 1), or Angular (version2+) ? Please keep the correct tag and remove the other. Commented Oct 22, 2018 at 10:38
  • angular 2+ @Pac0 Commented Oct 23, 2018 at 5:44

1 Answer 1

2

return false; after 'event.preventDefault' and change condition <=1.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.