From: Alan Knowles Date: Sun, 26 Aug 2012 13:17:48 +0000 (+0800) Subject: ux/DateDisplay.js X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=709be9db6ca9e00ce404e4077f2a6ddd73b0dee8;p=roojs1 ux/DateDisplay.js --- diff --git a/ux/DateDisplay.js b/ux/DateDisplay.js index cdf716bee2..e778705953 100644 --- a/ux/DateDisplay.js +++ b/ux/DateDisplay.js @@ -7,6 +7,25 @@ Roo.form.DateDisplay = function(config){ Roo.form.DateDisplay.superclass.constructor.call(this, config); this.picker = new Roo.DatePicker( config ); + + this.addEvents({ + /** + * @event select + * Fires when a date is selected + * @param {DatePicker} this + * @param {Date} date The selected date + */ + 'select': true, + /** + * @event monthchange + * Fires when the displayed month changes + * @param {DatePicker} this + * @param {Date} date The selected month + */ + 'monthchange': true + }); + + this.picker.on('select', this.onSelect, this); };