1. #1
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    22
    Vote Rating
    0
    bkirkman is on a distinguished road

      0  

    Default Percent and Currency controls/Fields

    Percent and Currency controls/Fields


    I can't seem to find a percent or currency component in the API doc's. Did I miss it or is there no such thing in ExtJS 4? I was hoping for a control that did the formatting in the text box for percent and currency directly with a raw value that could be obtained from the component to save to the back end. These would be input fields.

  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


    Will Ext.util.format() help?
    http://docs.sencha.com/ext-js/4-0/#!...xt.util.Format

    Regards,
    Scott.

  3. #3
    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


    You can also have a look at vtypes for input
    http://www.sencha.com/forum/showthre...71-More-VTypes!

    Regards,
    Scott.

  4. #4
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    22
    Vote Rating
    0
    bkirkman is on a distinguished road

      0  

    Default Tried util.Format

    Tried util.Format


    Scott,
    I am trying to dynamically create a textbox that will allow a user to enter only currency data. Here is a snippet of what I tried with the util.Format:

    Code:
    component = new Ext.form.field.Number(
    						{
    							value: item.defaultValue,
    							allowDecimals: item.precision > 0,
    							decimalPrecision: item.precision,
    							minValue: item.minValue,
    							maxValue: item.maxValue,
    							hideTrigger: hasspinner,
    							readOnly: readonly,
    							renderer: Ext.util.Format.usMoney,
    							grow: true
    
    
    						});
    What I was expecting was to see a textbox with $0.00 in it but it did not display that way - only 0.00. Did I use it correctly?

Thread Participants: 1

Tags for this Thread

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