-
25 Feb 2011 2:54 AM #1
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?
-
25 Feb 2011 10:13 AM #2
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
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.Code:menu: new Ext.picker.Date({ floating: true, showBy: Ext.menu.Menu.prototype.showBy })
I'll fix all these things for the next release.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
25 Feb 2011 11:52 AM #3
Actually, that will pop up the DatePicker, but that won't then disappear if you click outside of it.
The correct solution is
The missing border on the DatePicker has been fixed here ready for next release.Code:menu: { border: false, items: new Ext.picker.Date() }Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
28 Feb 2011 11:28 PM #4
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
-
1 Mar 2011 8:59 AM #5
This:
Gives this for meCode:{ text: 'Date', menu: { border: false, items: { xtype: 'datepicker' } } }
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
1 Mar 2011 10:00 AM #6
oh, just found out, i didnt call parent initComponent after setting the menu in initComponent
Now it works
Similar Threads
-
Equalent function of mailto:?
By jaisonjames in forum Ext 3.x: Help & DiscussionReplies: 4Last Post: 14 Jan 2011, 12:10 AM -
How can a dateMenu in menu disappear?
By hlzhang1982 in forum Ext 3.x: Help & DiscussionReplies: 1Last Post: 23 Nov 2009, 5:21 PM -
[OPEN] [FIXED][3.0svn4198] Ext.menu.DateMenu broken?
By papandreou in forum Ext 3.x: BugsReplies: 7Last Post: 4 Jun 2009, 8:38 PM -
Ext.menu.DateMenu & Firefox 3 Beta 5 display issue
By access9 in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 9 Jun 2008, 8:04 AM -
What is the HTML Form Tag equalent for multiple select
By ebizviz in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 9 Jan 2008, 5:32 PM


Reply With Quote