Dipin Krishnan
Dipin Krishnan

Reputation: 1280

How to make FullCalendar work on touch devices?

I was looking for a tablet friendly event calendar, but I did not find any suitable ones. But FullCalendar is one best jQuery calendar plugin that looks great on desktop and a tablet.

This calendar works perfectly on a desktop, but when it comes to tablet I am unable to select the start time and end time of an event, based on the touch and swipe. When i do this the calendar gets scrolled. Is there any solution for this? I have been looking around for a solution in vein.

Have anyone had this issue and did you solve it? Please share the method how you solved it. Any sort of help is appreciated.

Thanks in advance.

Upvotes: 19

Views: 30184

Answers (8)

Dinesh Srinivasan
Dinesh Srinivasan

Reputation: 61

It works for me

<FullCalendar
    ...
    selectLongPressDelay={1}
    ...
/>

Upvotes: 0

stringnome
stringnome

Reputation: 233

For those who have trouble selecting a day on a mobile device this question is very helpful, using prop longPressDelay as 10 it works!

See more in FullCalendar / Docs Touch Support

Upvotes: 2

Ckappo
Ckappo

Reputation: 597

With latest Full Calendar 2.7.1, touch is Supported. You can even set Options for Press delays. Just look at the Docs

Upvotes: 2

Pasdo
Pasdo

Reputation: 11

I used this plugin: jquery.ui.touch.js

It worked for me by this code:

$('#calendar').fullCalendar({
[...]
});

$('#calendar').addTouch();

Upvotes: 1

akivajgordon
akivajgordon

Reputation: 10521

FullCalendar touch support is available in the beta release for v2.7.0 according to this FullCalendar blog post.

Upvotes: 2

Gotschi
Gotschi

Reputation: 3194

THIS WORKS

I used this plugin: jquery.ui.touch.js

adds Touch support to Fullcalendar for iOS and Android devices

just use this to initialize your calendar:

eventRender: function(event, element) {
            $(element).addTouch();
        }

Upvotes: 10

yndolok
yndolok

Reputation: 5597

Since I struggled to get this to work with jQuery UI touch punch, and I couldn't find any complete example code, I thought I'd post the code I used to make creating and dragging events work on mobile devices:

NOTE: This example uses jQuery UI touch punch.

$(document).ready(function() {

  $('#calendar').fullCalendar({
    ...
    eventAfterRender: function(event, element, view) {
      element.draggable();
    }
  });

  $('.fc-view tbody').draggable();
});

Upvotes: 2

gwythen
gwythen

Reputation: 168

Have you tried including the Jquery UI Touch Punch?

By default, Jquery UI doesn't support Touch Events because it wasn't optimized for mobile devices. Touch Punch solved my problems with the Jquery UI Drag&Drop functionalities, which seem to be used by FullCalendar as well.

Hope it helps!

Upvotes: 15

Related Questions