1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    10
    Vote Rating
    0
    johnterran is on a distinguished road

      0  

    Default Unanswered: How do I use a spinner where the display value is different from value?

    Unanswered: How do I use a spinner where the display value is different from value?


    Hi,

    How do I use a spinner where display value is different from value?
    ie.
    I have a spinner with the values being the date format, but when I display the value,
    I want to display the formatted date, instead of the format itself.
    I tried processRawValue but this isn't it.

    xtype: 'spinnerfield',
    fieldLabel: 'Date Format',
    options: ["F j, Y", "D, F j, Y", "m-d-Y", "Y-m-d", "m/d/Y", "Y/m/d"], // this is my field
    processRawValue: function(v) {
    return Ext.Date.format(new Date(), v);
    },

    Thanks
    John

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,677
    Answers
    3355
    Vote Rating
    749
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Are you only using the core or are you using Ext JS 3/4?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    10
    Vote Rating
    0
    johnterran is on a distinguished road

      0  

    Default


    I am using ExtJS 4

  4. #4
    Sencha User lorezyra's Avatar
    Join Date
    Dec 2007
    Location
    Japan -- 日本
    Posts
    527
    Answers
    6
    Vote Rating
    3
    lorezyra will become famous soon enough

      0  

    Default


    You should consider using separate components (spinner fields) for each section of the date time... Then merge the values of those spinner fields into a single hidden form element using the desired format.
    Perfection as a goal is a nice idea that can point one in a specific direction. However, since "perfection" is an ever changing (evolving?) and moving target, one must admit that perfection can never be obtained...

    When in doubt, check the d4mn source code!

Thread Participants: 2

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar