Unanswered: Leading zeros in numberfield (Ext.form.field.Number) in 4.x
Unanswered: Leading zeros in numberfield (Ext.form.field.Number) in 4.x
I'm trying to extend the numberfield to have leading zeros and wanted to see if anybody has done this before.
I would like to have a hour, minute, and seconds fields that allow the user to enter a single number and the form field format the entry with leading zero. (i.e. The user enters 5 and tabs to the next field then the UI would show 05)
I've search the forum and found some related post but none for the extjs 4.x.
both approaches should also work for ext 4. in case you want to migrate my ux to ext 4, you will need to take a look at the new setValue method and adjust changes (should be quite easy).
using a textfield with the maskRe - config set to
Code:
maskRe:/\d/
is also ok. you can set a listener on the blur event and change the value of the field.
Best regards
Tobias Uhlig
__________
Sencha Inc
Tobias Uhlig, Solutions Engineer
Private Projects: S-CIRCLES Social Network Engine
Commercial Theming for Ext JS 3 & 4