/** * A month / year picker component. This class is used by the * {@link Ext.picker.Date Date picker} to allow browsing and selection of year and * months combinations, but may also be used as a standalone component. * * @example * Ext.create({ * xtype: 'monthpicker', * renderTo: document.body, * value: new Date(), * onSelect: function() { * Ext.Msg.alert('Selected', this.getValue()); * }, * listeners: { * okclick: 'onSelect', * monthdblclick: 'onSelect', * yeardblclick: 'onSelect', * cancelclick: function () { * this.setValue(new Date()); * } * } * }); */ Ext.define('Ext.picker.Month', { extend: 'Ext.Component', requires: [ 'Ext.XTemplate', 'Ext.util.ClickRepeater', 'Ext.Date', 'Ext.button.Button' ], alias: 'widget.monthpicker', alternateClassName: 'Ext.MonthPicker', isMonthPicker: true, focusable: true, childEls: [ 'bodyEl', 'prevEl', 'nextEl', 'monthEl', 'yearEl' ], renderTpl: [ '