X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=docs%2Fsrc%2FRoo_menu_DateItem.js.html;fp=docs%2Fsrc%2FRoo_menu_DateItem.js.html;h=8f81072c72f6691cae1ef1ab31cab2e9d7d2388a;hb=9ff8ded6bbbd258ecd646184ba26020874e2c085;hp=0000000000000000000000000000000000000000;hpb=2542b67d1a0768025056f2f330bfe50b64d1ad38;p=roojs1 diff --git a/docs/src/Roo_menu_DateItem.js.html b/docs/src/Roo_menu_DateItem.js.html new file mode 100644 index 0000000000..8f81072c72 --- /dev/null +++ b/docs/src/Roo_menu_DateItem.js.html @@ -0,0 +1,40 @@ +/home/alan/gitlive/roojs1/Roo/menu/DateItem.js/* + * Based on: + * Ext JS Library 1.1.1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * + * Originally Released Under LGPL - original licence link has changed is not relivant. + * + * Fork - LGPL + * <script type="text/javascript"> + */ + +/** + * @class Roo.menu.DateItem + * @extends Roo.menu.Adapter + * A menu item that wraps the {@link Roo.DatPicker} component. + * @constructor + * Creates a new DateItem + * @param {Object} config Configuration options + */ +Roo.menu.DateItem = function(config){ + Roo.menu.DateItem.superclass.constructor.call(this, new Roo.DatePicker(config), config); + /** The Roo.DatePicker object @type Roo.DatePicker */ + this.picker = this.component; + this.addEvents({select: true}); + + this.picker.on("render", function(picker){ + picker.getEl().swallowEvent("click"); + picker.container.addClass("x-menu-date-item"); + }); + + this.picker.on("select", this.onSelect, this); +}; + +Roo.extend(Roo.menu.DateItem, Roo.menu.Adapter, { + // private + onSelect : function(picker, date){ + this.fireEvent("select", this, date, picker); + Roo.menu.DateItem.superclass.handleClick.call(this); + } +}); \ No newline at end of file