Customize value

20 Feb 20171 minute to read

The current value of the Numeric Textbox can be specified by using the Value property. The range for the Numeric Textbox can be specified by using the MaxValue and MinValue properties. The Numeric Textbox can only accept values within those specified range. The step property is used to set the step value in each incrementing or decrementing textbox when the spin buttons are clicked or up/down arrows are used.

  • HTML
  • <input id="sample" name="sample" data-role="ejmnumeric" type="number"  data-ej-value="30" data-ej-step="2" data-ej-maxvalue="100" data-ej-minvalue="20"  />

    The following screenshot displays the output.

    The DecimalPlaces property makes you restrict the decimal places to set the decimal (floating point) numbers.

  • HTML
  • <input type="number" id="textbox_sample" data-role="ejmnumeric" data-ej-decimalPlaces="3"/>