Results 1 to 2 of 2

Thread: Date is not displayed when the date is selected from datefield.

  1. #1

    Default Date is not displayed when the date is selected from datefield.

    I am having datefields in menubutton.But as soon as i select date from datepicker the datefield disappears.
    here is the code which i hav written.Can anyone pls reply asap....




    Code:
     Ext.onReady(function(){
     
                        Ext.QuickTips.init();
     
                       
     
                        var simple = Ext.create('Ext.form.Panel', {
                            url:'save-form.php',
                            frame:true,
                            title: 'Simple Form',
                            bodyStyle:'padding:5px 5px 0',
                            width: 350,
                            fieldDefaults: {
                                msgTarget: 'side',
                                labelWidth: 75
                            },
                           
     
                            items: [
                            {
                                  xtype:'button',
                                  fieldLabel:'Filter button',
                                  text:'Filter',
                                  id:'filter',
                                  menu      : [
    {
        xtype:'datefield',
                 fieldLabel:'Date :spicker',
                 name:'dtpk1'
                 
       },{
        xtype:'datefield',
                  fieldLabel:'Date picker',
                  name:'dtpk1'
       }
                                          ]
                                           
                               }
                            ]
                           });
     
                        simple.render(document.body);
                    });
    Last edited by mitchellsimoens; 21 Mar 2012 at 6:47 AM. Reason: added [CODE] tags

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,392
    Answers
    3997

    Default

    Menu items have a hideOnClick config

    http://docs.sencha.com/ext-js/4-0/#!...fg-hideOnClick

    Also, you should use the Ext.menu.DateItem instead of a date field.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Posting Permissions

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