1. #1
    Ext JS Premium Member
    Join Date
    Dec 2011
    Posts
    227
    Vote Rating
    2
    nicolabaldo is on a distinguished road

      0  

    Default number format

    number format


    I need to set decimal in this way:
    5,3 -> 5,30

    I try to use this code but the char '0' doesn't appear.

    Ext.override(Ext.form.NumberField, {
    setValue: function(v) {
    this.decimalSeparator= ',';
    if (v){
    v= v.toFixed(2);
    }
    return Ext.form.NumberField.superclass.setValue.call(this, v);
    }
    });

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Have a look at: Ext.util.Format.number

    Code:
    > val = 5.3;
    > fmtVal = Ext.util.Format.number(val, '0,000.00'); // see /i for local separators.
    ? 5.30
    Regards,
    Scott.

  3. #3
    Ext JS Premium Member
    Join Date
    Dec 2011
    Posts
    227
    Vote Rating
    2
    nicolabaldo is on a distinguished road

      0  

    Default


    Ok thanks!

  4. #4

  5. #5
    Sencha User
    Join Date
    Oct 2011
    Location
    indonesia
    Posts
    17
    Vote Rating
    0
    stoneboys is on a distinguished road

      0  

    Default


    Quote Originally Posted by scottmartin View Post
    Have a look at: Ext.util.Format.number

    Code:
    > val = 5.3;
    > fmtVal = Ext.util.Format.number(val, '0,000.00'); // see /i for local separators.
    ? 5.30
    Regards,
    Scott.
    Hi.. i use it with my local separator like ( '0.000,00/i' ) for ( 1.000,00 ) but its not work, what wrong?

  6. #6
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Do you have a locale locale file that may be overriding thousandSeparator?

    Scott.

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi