ScottLogic / finput

A vanilla-JS financial amount input control
http://scottlogic.github.io/finput
MIT License
22 stars 10 forks source link

empty input converted to 0 #127

Open dogle-scottlogic opened 6 years ago

dogle-scottlogic commented 6 years ago

An empty input of '' is converted to 0 when passed to the onChange as the getRawValue function uses the helpers.formattedToRaw function which returns Number('');. Request that an option is added to allow an empty string or null to be returned to allow the ability to distinguish in the event handler if a user has entered a 0 or has cleared the input.