Threaded View

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Vote Rating
    ArenINM is on a distinguished road


    Default Answered: TypeError: 'undefined' is not a function

    I try to use the Ext.util.Format.number as this:

    val = 25000.30;
    fmtVal = Ext.util.Format.number(val, '0,000.00');
    fmtSpace = fmtVal.replace(',',' ');
    Ext.ComponentQuery.query('#sample')[0].setValue("test: " + fmtSpace );

    But it gives a error on this row:

    fmtVal = Ext.util.Format.number(val, '0,000.00');

    TypeError: 'undefined' is not a function (evaluating 'Ext.util.Format.number(val, '0,000.00')')

    Can somebody explain me what this mean, and what can I do to solve this?

  2. There is no 'number' function provided by Ext.util.Format in Sencha Touch.

    Edit: You can try using the formatting functions that are included in JavaScript instead.

Thread Participants: 1

Tags for this Thread