I can input more than the max set in the ion-input or less, and i cannot call the " HTMLInputElement.stepDown() - HTMLInputElement.stepUp() " using a ref from a button, code:
Code link: https://pastebin.com/raw/9XZaFsyV
Another issue is that the ion-input freezes after entering a number, if i try to focus on it again doesnt work.
I received a GitHub issue about this a few days ago, so I will post what I said on that thread here as well:
min properties are passed to the underlying native
input and as such as subject to the behavior that has been implemented by browser vendors.
If the value exceeds the
max or is less than the
min, then the input fails constraint validation. In other words, users can still enter any number they want, but if the number is out of the accepted range then the form will not submit.
You can see the same behavior using a native
input outside of Ionic Framework: https://codepen.io/liamdebeasi/pen/rNjQEYK
pattern property. Please note that if you use
pattern then you will need to change the input type to
text: HTML attribute: pattern - HTML: HyperText Markup Language | MDN
Also regarding calling the methods, you are going to need to get a reference to the native
input element. You can use the
getInputElement method on
ion-input to get a reference to the native
input so you can call
stepDown on it: ion-input: Ionic Framework API Docs