Formatting the NumericStepper display value

The Spark NumericStepper component has two built in properties that allow a developer to format the NumericStepper value in any way that they choose. For example, if you want to add a “$” to the front of your value, you can do so using these properties. The properties are valueFormatFunction and its companion function, the valueParseFunction. Each of these properties works the same way: you specify the name of a function that you write to perform the desired action. One common mistake is to only use the valueFormatFunction, and then wonder why the NumericStepper no longer works as expected. The reason is that if you convert the value to a string in order to append something to it, you then have to make use of an valueParseFunction to extract the value from the string in order for the NumericStepper to be able to use it again. In most cases these properties should be used together – the valueFormatFunction to specify a function to format the value and the valueParseFunction to specify the function to extract the value. Examples can be found here: valueFormatFunction; valueParseFunction