Results 1 to 4 of 4

Thread: EditorGridPanel with date, - how to disable manual entering the date?

  1. #1
    Sencha User
    Join Date
    Jan 2011
    Posts
    47

    Exclamation EditorGridPanel with date, - how to disable manual entering the date?

    I have editorGridPanel with column:

    {
    header : "Date1",
    dataIndex : 'date1',
    sortable : true,
    width: 90,

    locked: true,

    renderer: function(value, metaData, r) {
    metaData.attr = rowcolor(r.data.status);
    return value;
    },

    editor : new Ext.ux.form.CustomDateField({ /*Ext.ux.form.Custom*/
    allowBlank: true,
    format: 'm/d/Y',
    width : 120


    ,listeners: {
    'keydown' : function (field_, e_ ) {
    $.log( "Field", field_ );
    $.log( "Event", e_ );
    }
    }


    })
    },
    I want disable users input, just allow them - select the date.

    I try :

    1. Add listeners on keypress to whole grid. Not works in editor mode
    2. Add this one ^^^ listener, your see, no this event exit seems

    Help me ...

  2. #2
    Sencha User
    Join Date
    Jul 2009
    Posts
    88

    Default

    you can try the setEditable(false) function from Ext.form.DateField , if your custom component extends from it.
    http://dev.sencha.com/deploy/ext-3.3...ld-setEditable


  3. #3
    Sencha User
    Join Date
    Jul 2009
    Posts
    88

    Default

    or add editable : false in the editor:{...} config

    Quote Originally Posted by Ash2009 View Post
    you can try the setEditable(false) function from Ext.form.DateField , if your custom component extends from it.
    http://dev.sencha.com/deploy/ext-3.3...ld-setEditable

  4. #4
    Sencha User
    Join Date
    Jan 2011
    Posts
    47

    Default

    Tnx, i make another way ...


    Code:
              listeners: {
                      'keydown' : function (field_, e_  )  {
                        $.log( e_.getKey() );
                        field_.onTriggerClick();
                        e_.stopEvent();
                        return false;
                  },
                      'focus' : function (field_  )  {
                        field_.onTriggerClick();
                        e_.stopEvent();
                        return false;
                  }
    ...
    in field declaration ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •