Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / src / menu / DatePicker.js
index 192395f..e334c5c 100644 (file)
@@ -1,3 +1,17 @@
+/*
+
+This file is part of Ext JS 4
+
+Copyright (c) 2011 Sencha Inc
+
+Contact:  http://www.sencha.com/contact
+
+GNU General Public License Usage
+This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file.  Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+
+If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
+
+*/
 /**
  * @class Ext.menu.DatePicker
  * @extends Ext.menu.Menu
  * Applying {@link Ext.picker.Date DatePicker} configuration settings to
  * <b><tt>this</tt></b> will <b>not</b> affect the DatePicker's configuration.</li>
  * </ul></div>
+ *
  * {@img Ext.menu.DatePicker/Ext.menu.DatePicker.png Ext.menu.DatePicker component}
+ *
  * __Example Usage__
-     var dateMenu = Ext.create('Ext.menu.DatePicker', {
-        handler: function(dp, date){
-            Ext.Msg.alert('Date Selected', 'You choose {0}.', Ext.Date.format(date, 'M j, Y'));
-
-        }
-    });
-
-    Ext.create('Ext.menu.Menu', {
-               width: 100,
-               height: 90,
-               floating: false,  // usually you want this set to True (default)
-               renderTo: Ext.getBody(),  // usually rendered by it's containing component
-               items: [{
-                   text: 'choose a date',
-                   menu: dateMenu
-               },{
-            iconCls: 'add16',
-                   text: 'icon item'
-               },{
-                   text: 'regular item'
-               }]
-       });
-
- * @xtype datemenu
+ *
+ *     var dateMenu = Ext.create('Ext.menu.DatePicker', {
+ *         handler: function(dp, date){
+ *             Ext.Msg.alert('Date Selected', 'You choose {0}.', Ext.Date.format(date, 'M j, Y'));
+ *         }
+ *     });
+ *  
+ *     Ext.create('Ext.menu.Menu', {
+ *         width: 100,
+ *         height: 90,
+ *         floating: false,  // usually you want this set to True (default)
+ *         renderTo: Ext.getBody(),  // usually rendered by it's containing component
+ *         items: [{
+ *             text: 'choose a date',
+ *             menu: dateMenu
+ *         },{
+ *             iconCls: 'add16',
+ *             text: 'icon item'
+ *         },{
+ *             text: 'regular item'
+ *         }]
+ *     });
+ *
  * @author Nicolas Ferrero
  */
  Ext.define('Ext.menu.DatePicker', {
         Ext.apply(me, {
             showSeparator: false,
             plain: true,
+            border: false,
+            bodyPadding: 0, // remove the body padding from the datepicker menu item so it looks like 3.3
             items: Ext.applyIf({
                 cls: Ext.baseCSSPrefix + 'menu-date-item',
                 id: me.pickerId,
     hidePickerOnSelect: function() {
         Ext.menu.Manager.hideAll();
     }
- });
\ No newline at end of file
+ });