| Page 1 of 1 | [ 7 posts ] |
|
Hi,
I'm trying to extend the Calendar control but I'm getting an error saying 'extend failed, please check that all dependencies are included'. Here is my code: Code: YAHOO.namespace("custom"); YAHOO.lang.extend(YAHOO.custom.Calendar, YAHOO.widget.Calendar); YAHOO.custom.Calendar = function(id, containerId, options) { YAHOO.custom.Calendar.superclass.constructor.call(this, id || YAHOO.util.Dom.generateId(), containerId, options ); }; YAHOO.custom.init = function() { YAHOO.custom.cal1 = new YAHOO.custom.Calendar("cal1","cal1Container"); YAHOO.custom.cal1.render(); }; YAHOO.util.Event.onDOMReady(YAHOO.custom.init); My dependencies are: yahoo.js, event.js, dom.js and calendar.js. I'm using YUI 2.8.2. Is there something I missed/done wrong? Thanks. |
Alberto SantiniYUI Contributor
|
Hello valined.
I noted you extend the custom calendar before you defined it. Did you try to move the extend statement after the definition of custom calendar? YAHOO.custom.Calendar = function(id, containerId, options) { ... YAHOO.lang.extend(YAHOO.custom.Calendar, YAHOO.widget.Calendar); Regards, IceBox |
|
icebox,
Of course you're right. What was I thinking? Moving the extend() call after the calendar definition fixed the problem. Thanks. |
|
Hello, I have similar problem, but with YAHOO.widget.DataTable element. My code:
Code: YAHOO.namespace("yuiblog.widget"); YAHOO.yuiblog.widget.DataView = function(elContainer , oColumnSet , oDataSource , oConfigs) { if (arguments.length > 0) { YAHOO.yuiblog.widget.DataView.superclass.constructor.call(this, elContainer , oColumnSet , oDataSource , oConfigs); } }; YAHOO.lang.extend(YAHOO.yuiblog.widget.DataView, YAHOO.widget.DataTable); And I have an error: "extend failed, please check that all dependencies are included" If I try to extend from Calendar class, for example: Code: YAHOO.lang.extend(YAHOO.yuiblog.widget.DataView, YAHOO.widget.Calendar); all work right. What I do wrong? Thanks |
Alberto SantiniYUI Contributor
|
Hello Pavel.
I suppose your reference is this one: http://www.yuiblog.com/blog/2007/04/23/dataview/ Well, if you use the same seed files (2.3.1), it should work fine. You are welcome to update that example for the latest YUI. Regards, IceBox |
|
Thanks for the input. Very good. Where are you from in Italy? I have been to Milano, Florence and Venice. Italy is my favorite place and look forward to going back. The people are friendly and HAPPY.
|
|
This is my FIRST post in this forum so please be gentle.
There are quite many calendar examples and I read through the quick start one. I simply copy the source and it works! http://developer.yahoo.com/yui/examples ... clean.html What I want now is: text input, when mouse click the text input, popup the calendar like the image below. Anyone know howto? |
| Page 1 of 1 | [ 7 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group