Ion-input number issues


Hello, I have the following issues with the ion-input that is set to number.

First, I want to be able to clear the content not just by the cross button on the right (clearInput attribute), but also from the typescript code. Well,I can set the model to zero, but then the field would contain zero. I want it to be empty. Now I can also assign the field the value of undefined, but that doesn’t refresh the field visible content. I thinks it’s this bug:

That thread is however 7 years old so it seems unlikely this would still not be fixed.

The second issue is with invalid input. Setting the input type to “number” doesn’t actually prevent you from typing anything you want, it can only mark the input as invalid by displaying the red outline. On mobile device, you get number keyboard which is cool, however you can still put multiple decimal points thus making it NaN, but the invalid value will still show like that and what’s worse, since the model value will be empty (although not the displayed content), the floating label will be drawn over it which looks terrible. I haven’t found any solution to that… First it would be cool if I could hide the decimal point button on the number keyboard, but even if I can’t I would like to be able to prevent the user from typing anything.

I also tried using (input) event to check for the displayed content and remove any unsupported characters (basically anything apart from digits), but I don’t know how to get the displayed value and the actual model value is always a valid number (or empty).

Any ideas?

//edit: Maybe also this is relevant:

//deleted misleading paragraph

That all said, I find the current implementation altogether unusable. But I find it quite improbable that noone would notice. The forum should be full of complaints like that, but it is not. Am I doing something wrong?