p-slider: Entering a decimal value without a preceding number before decimal point gives error #11790
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
When an input box is mapped to the
p-slider
and when the step value is a decimal number, the number entered in the input box without a preceding number before the decimal such as.5
or.32
and change the slider after inputting the value and it throws an error during number conversion.Environment
Angular CLI: 14.0.7
Node: 16.16.0
Package Manager: npm 8.16.0
OS: darwin x64
Reproducer
No response
Angular version
14.0.7
PrimeNG version
14.0.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
16.6.0
Browser(s)
No response
Steps to reproduce the behavior
p-slider
element in your application with a template reference#slider
p-inputtext
element in your application.[(ngModel)]
orformControlName
.p-slider
attributes[step]="0.1" [max]="1" [min]="0"
..2
in the input box..2
in the input box.Expected behavior
Value
.2
to be converted to0.2
instead of throwing an errorThe text was updated successfully, but these errors were encountered: