1. #1
    Sencha User
    Join Date
    Jan 2011
    Posts
    46
    Vote Rating
    0
    oe.elvik is on a distinguished road

      0  

    Default Ext.menu.DateMenu equalent

    Ext.menu.DateMenu equalent


    I want a datemenu to drop down from a button button click, in extjs 3 I used Ext.menu.DateMenu is there somethin similar in extjs 4. I tryed using Ext.picker.Date, but was unable to use it directly as a menu for the button.

    Any suggestions?

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,498
    Vote Rating
    46
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Yes, Ext.picker.Date, although floatable (as all Components are in Ext 4) is lacking the "showBy" method.

    In fact, this should be hoisted into the Component class in 4.0 because Components may be configured floating: true

    I'll fix that.

    In the meantime, you can borrow the method. configure your Button with

    Code:
                    menu: new Ext.picker.Date({
                        floating: true,
                        showBy: Ext.menu.Menu.prototype.showBy
                    })
    And ensure you are using ext-all(-debug).js because there's a bug in Ext.date.Picker's definition: it won't inherit day names and month names correctly.

    I'll fix all these things for the next release.

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,498
    Vote Rating
    46
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Actually, that will pop up the DatePicker, but that won't then disappear if you click outside of it.

    The correct solution is

    Code:
                    menu: {
                        border: false,
                        items: new Ext.picker.Date()
                    }
    The missing border on the DatePicker has been fixed here ready for next release.

  4. #4
    Sencha User
    Join Date
    Jan 2011
    Posts
    46
    Vote Rating
    0
    oe.elvik is on a distinguished road

      0  

    Default item.on is not a function

    item.on is not a function


    I tried your code, but get this error: item.on is not a function
    Tried to remove the param items, but stil got the error, so the problem must be the menu object

  5. #5
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,498
    Vote Rating
    46
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    This:

    Code:
                {
                    text: 'Date',
                    menu: {
                        border: false,
                        items: {
                            xtype: 'datepicker'
                        }
                    }
                }
    Gives this for me


  6. #6
    Sencha User
    Join Date
    Jan 2011
    Posts
    46
    Vote Rating
    0
    oe.elvik is on a distinguished road

      0  

    Default


    oh, just found out, i didnt call parent initComponent after setting the menu in initComponent

    Now it works

Similar Threads

  1. Equalent function of mailto:?
    By jaisonjames in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 14 Jan 2011, 12:10 AM
  2. How can a dateMenu in menu disappear?
    By hlzhang1982 in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 23 Nov 2009, 5:21 PM
  3. [OPEN] [FIXED][3.0svn4198] Ext.menu.DateMenu broken?
    By papandreou in forum Ext 3.x: Bugs
    Replies: 7
    Last Post: 4 Jun 2009, 8:38 PM
  4. Ext.menu.DateMenu & Firefox 3 Beta 5 display issue
    By access9 in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 9 Jun 2008, 8:04 AM
  5. What is the HTML Form Tag equalent for multiple select
    By ebizviz in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 9 Jan 2008, 5:32 PM

Thread Participants: 1

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..."