Clear Up
SharpKit Reference

DatePicker Class

A menu containing an Ext.picker.Date Component.

Notes:

  • Although not listed here, the constructor for this class accepts all of the configuration options of Ext.picker.Date.
  • If subclassing DateMenu, any configuration options for the DatePicker must be applied to the initialConfig property of the DateMenu. Applying Date Picker configuration settings to this will not affect the Date Picker's configuration.

Example:

  
var dateMenu = Ext.create('Ext.menu.DatePicker', {
            handler: function(dp, date){
            Ext.Msg.alert('Date Selected', 'You selected ' + 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'
            }]
            });
            

Namespace: Ext.menu

Fields

Name Description
hideOnClick False to continue showing the menu after a date is selected. Defaults to: true
pickerId An id to assign to the underlying date picker. Defaults to: null

Properties

Name Description
picker The Ext.picker.Date instance for this DateMenu
© Copyright 2005-2011 SharpKit. All rights reserved.