Closed
Description
Reproduction
Steps to reproduce:
- Create a matInput with type="number" and step="0.01"
- Get MatInputHarness for the input and attempt to set a decimal value on it, e.g.
await input.setValue('22.45');
Expected Behavior
The value is set to 22.45
Actual Behavior
What behavior did you actually see?
Chrome gives the error The specified value "22." is not a valid number. The value must match to the following regular expression: -?(\d+|\d+\.\d+|\.\d+)([eE][-+]?\d+)?
The actual set value is only the decimal part of the number, i.e. 45
.
Environment
- Angular: 9.1.9
- CDK/Material: 9.2.4
- Browser(s): Chrome 80.0.3987.149
- Operating System (e.g. Windows, macOS, Ubuntu): macOS 10.15.5