swipe support

Hi:

Does the mobile calendar support swipe. ie on the day calendar it seems the only way to go to the next day is to tap the right arrow. It would seem to be a nature expectation that I could swipe to the next day.

If you do support it it, is there an example?

If not are you planning on?

Thanks again

Jim

Hi,

there is onSwipeX event in Touch library. You may try to set this event handler for “dayList” view

$$('scheduler').$$('dayList').attachEvent("onSwipeX",function(start,end){ var diff = start.x-end.x; $$('scheduler').setDate(null,(diff>0?1:-1),"day"); });

Yes, that works…

How about for the month?

Thanks

The same approach can be used for calendar and list in Month view:

$$("scheduler").$$("calendar").attachEvent("onSwipeX",scrollMonth); $$("scheduler").$$("calendarDayEvents").attachEvent("onSwipeX",scrollMonth); function scrollMonth(start,end){ var diff = start.x - end.x; $$("scheduler").setDate(null,(diff>0?1:-1),"month"); }

if you want to apply this for both Day and Month view, you may try the following:

[code]$$(“scheduler”).$$(“dayBar”).attachEvent(“onSwipeX”,scrollCurrentView);
$$(“scheduler”).$$(“calendar”).attachEvent(“onSwipeX”,scrollCurrentView);
$$(“scheduler”).$$(“calendarDayEvents”).attachEvent(“onSwipeX”,scrollCurrentView);
$$(“scheduler”).$$(“dayList”).attachEvent(“onSwipeX”,scrollCurrentView);

function scrollCurrentView(start,end){
var diff = start.x - end.x;
var view = $$(“scheduler”).$$(“buttons”).getValue();
$$(“scheduler”).setDate(null,(diff>0?1:-1),view);
}[/code]

Very nice.
Thank you!

This works great!

Is there any chance there’s a similar extension available so that I can swipe on my iPad using the touch.js library in the standard version of scheduler?

Hello,

unfortunately, there is not swipe handling in a current vertion of desktop Scheduler.