Thousand Separator in NumberField

  1. #1

    Thousand Separator in NumberField

    Hi,

    Is there a way that makes the NumberField display the value with Thousand Separator(,) ?

    For example, display the number without Thousand Separator when editing(got focus), and insert Thousand Separator after the numberfield lost focus.

    I'v read many threads but couldn't find this issue exactly(Such as using TextField instead of NumberField).

    Thanks a lot.
    Last edited by EXT; Apr 17, 2014 at 8:31 AM.
  2. #2
    Maybe something like the following can help:

    Example

    <ext:TextField runat="server" MaskRe="/[0-9\$\.]/">
        <Listeners>
            <Focus Handler="this.setValue(this.getValue().replace(/[\$,]/g, ''));" />
            <Blur Handler="this.setValue(Ext.util.Format.usMoney(this.getValue().replace(/[$]/g, '')));" />
        </Listeners>
    </ext:TextField>
    Geoffrey McGill
    Founder

Similar Threads

  1. Replies: 25
    Last Post: Jan 29, 2014, 3:03 AM
  2. [CLOSED] How to allow thousand separator in ext:NumberField?
    By sailendra in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: May 07, 2012, 10:35 AM
  3. [CLOSED] blank space as thousand separator
    By RomualdAwessou in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 19, 2011, 7:04 PM
  4. [CLOSED] Thousand separator in number Field
    By FpNetWorth in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 28, 2010, 1:01 PM
  5. [CLOSED] How to avoid using Thousand Separator in Coolite Number Field
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 02, 2010, 8:29 AM

Posting Permissions