View Full Version : Error in display Scheduler on Select Date from Date Picker

14 Mar 2012, 4:21 AM

I am working with ExtJS MVC.
I want to display Scheduler as per Select Date from Date Picker.
For that I had include following code but getting Error like this.setTimeSpan is not a function

tbar: [
id: 'datetimePicker',
enableToggle: true,
text: 'Select Date',
toggleGroup: 'span',
scope: this,
menu: Ext.create('Ext.menu.DatePicker', {
handler: function(dp, date) {
var D = Ext.Date;
this.setTimeSpan(D.add(date, D.HOUR, 8), D.add(date, D.HOUR, 20));

14 Mar 2012, 11:21 AM
You have a scoping issue. The scope of the handler is going to be off the menu item not the scheduler.