/devextreme-numberbox-zero-masks

This example demonstrates how to overcome NumberBox limitations if you use '0' in the format mask.

Primary LanguageTypeScriptOtherNOASSERTION

NumberBox for DevExtreme - Extend features of mask formats that contain 0

In NumberBox, you can use LDML-pattern masks for formatting values. # and 0 special characters apply the following limitations to NumberBox behavior:

  • If 0 is in the mask, users cannot erase this character in NumberBox.
  • If one or more # characters are in the mask (without 0 characters), users cannot enter numbers starting with 0 (for example, 0.123).

This example demonstrates how to overcome these limitations. You can test this implementation in standalone and DataGrid FilterRow editors:

NumberBox for DevExtreme - Extend features of mask formats that contain 0

Define the onKeyDown event handler and switch between zero-based and non-zero formats of the same structure to get the desired result.

Files to Review

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)