1. #1
    Sencha Premium Member
    Join Date
    Jan 2012
    Vote Rating
    cswsteve is on a distinguished road


    Default Force 2 decimals to show in a Number Field?

    Force 2 decimals to show in a Number Field?

    Is there an easy way to force 2 decimal places to always show in a Number Field or any other component in Architect? If I set the decimalPrecision to 2 it does not display 2 decimals for numbers like 0 or 1.5. I want all numbers to always show 2 decimals and display as 0.00 and 1.50.

    I have looked at these 2 forum posts but they do not work very well in Sencha Architect.

    To give you more details, I am creating a simple order and customer history form and have several numeric fields that need to display as a currency amount. Right now it looks odd to see the numbers with various decimal place lengths.

    Here is an example of how it currently looks setting the Number Field's decimalPrecision to 2.

    Order Total: 153.1
    Shipping: 25
    Sales Tax: 12.7
    Subtotal: 190.8

    However, what I need is this.

    Order Total: 153.10
    Shipping: 25.00
    Sales Tax: 12.70
    Subtotal: 190.80

    It seems so simple and standard that I cannot believe this feature does not exist in Architect. Am I missing something in the Config?


  2. #2
    Sencha Premium Member
    Join Date
    Jun 2013
    Vote Rating
    LandryAssocies is on a distinguished road



    I also need that !

  3. #3
    Ext JS Premium Member tangix's Avatar
    Join Date
    Mar 2010
    Stockholm, Sweden
    Vote Rating
    tangix is a jewel in the rough tangix is a jewel in the rough tangix is a jewel in the rough



    Quick and dirty would be to add the NumberField to the project and just take the UX code and add as an override (in this example, you need to change the references to Ext.ux.form.NumericField in the code).
    This does not solve the 2 decimal problem, but fixes the currency symbol things at least.

Thread Participants: 2

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