Previous & Next buttons skip a day

Hello,

I am having a bug with my mobile scheduler. Whenever I press previous or next, a day gets skipped. For example, if I am on December 3 in day view and click next, it goes to December 5. Same with previous - it would go to December 1. And it keeps doing this. Here is my code which involves the scheduler:

var sCurrentDate = new Date(); scheduler.config.readonly = true; scheduler.config.header_date = '%M %j, %Y'; scheduler.config.item_date = "%m-%j-%y"; scheduler.config.hour_date = "%h:%i%a"; scheduler.config.scale_hour = "%h"; scheduler.config.init_date = sCurrentDate; scheduler.config.bottom_toolbar = [ { view: "button", id: "today", label: scheduler.locale.labels.icon_today, inputWidth: scheduler.xy.icon_today, align: "left", width: scheduler.xy.icon_today + 6 }, { view: "segmented", id: "buttons", selected: "list", align: "center", multiview: true, options: [ { value: "list", label: scheduler.locale.labels.list_tab, width: scheduler.xy.list_tab }, { value: "day", label: scheduler.locale.labels.day_tab, width: scheduler.xy.day_tab }, { value: "month", label: scheduler.locale.labels.month_tab, width: scheduler.xy.month_tab } ] }, { view: "button", css: "add", id: "add", align: "right", label: " + ", inputWidth: 42, width: 50 }, { view: "label", label: "", inputWidth: 42, width: 50, batch: "readonly" } ];

$$('segmented1').attachEvent('onItemClick', function () { LoadActivities(this.getValue()); });

function LoadActivities(sCurrentView) { var dStartDate = new Date(sCurrentDate); var sStartDate = dStartDate.getFullYear() + "/" + (dStartDate.getMonth() + 1) + "/" + dStartDate.getDate(); $$('scheduler').load(sBaseURL + '/Mobile/LoadActivities.aspx?sMode=' + sCurrentView + '&sDate=' + sStartDate + '&x=' + Math.random() + '&sAuthCode=' + sAuthCode, 'scheduler'); }

Also, this never happened before. Then I used code from the forums to try something out:

$$('scheduler').$$('prev').attachEvent('onItemClick', onViewChange); $$('scheduler').$$('next').attachEvent('onItemClick', onViewChange); function onViewChange() { dhx.delay(function () { sCurrentDate = $$("scheduler").coreData.getValue(); alert($$("scheduler").coreData.getValue()); //LoadActivities(); }); }
And it started happening. I have since removed this code and it continues to happen. When I had that code in there and click Next or Previous buttons, the breakpoints would hit onViewChange() twice every time and pop up two alerts for every click. Any idea what might cause this to occur?

Hello,

could you attach the sample that reproduces the problem ?