1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    9
    Vote Rating
    0
    Satakshi is on a distinguished road

      0  

    Default how to format a date in a displayfield?

    how to format a date in a displayfield?


    My requirement is:
    i want to take an input date from a datefield, and then display the value in xtype: displayfield.
    the problem is: currently the value is being displayed like this-
    Thu Mar 1 00:00:00 UTC+0530 2012

    Code:
    var dateItem ={
            layout: 'column',       
            items: [
                {
                    xtype: 'datefield',
                    id: 'dateInput',
                    name: 'dateInput',
                    format: 'm/d/Y',
                    
                    fieldLabel: 'Date',
                    labelWidth: 50
                },
                {
                    xtype: 'button',                        
                    width: 90,
                    text : 'Get List',                
                    listeners: {
                        click: function() {                  
                        dateVal=Ext.getCmp('dateInput').getValue();    
                        Ext.getCmp('dateId').setValue(dateVal);
                        }
                    }
                }
                
            ]
        };
    //-------------Message-------------------
            
            var dateLabel={
                        xtype: 'displayfield',
                        bodyStyle: itemStyle,
                        fieldLabel: 'List of application for',
                        labelWidth: 130,
                        id: 'dateId',
                        value: '1/1/1900'
            }

  2. #2
    Sencha User
    Join Date
    Jun 2011
    Posts
    55
    Vote Rating
    0
    Gabanjo is on a distinguished road

      0  

    Default


    If you do:
    Code:
     dateVal=Ext.getCmp('dateInput').getRawValue();
    you should get what you want.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    9
    Vote Rating
    0
    Satakshi is on a distinguished road

      0  

    Default


    Thank you. It worked.

Thread Participants: 1

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