PDA

View Full Version : How to remove selective items from a date field search component in EXtjs



tsensuous.grace
19 Jun 2016, 11:39 AM
I have a dropdown for datepicker that im using to select dates. I'm using the Ext.menu.Checkitem to create a dropdown like below:


fields: [
filter: { ype: 'string',
xtype: 'superdate-search-field',
fieldLabel: "Date"
}
]


dd = {};
dd.week = new Ext.menu.CheckItem({
text: 'Week'
});
dd.month = new Ext.menu.CheckItem({
text: 'Week'
});
dd.year = new Ext.menu.CheckItem({
text: 'Week'

});
dd.lastWeek = new Ext.menu.CheckItem({
text: 'Week'
});



From the above list I'd like to remove 'week' and 'month' items from the list on render.

this.on('render', function() {
//remove the 'week' and 'month' options

}, this});

Is there any method or a specific way to do so?