Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fullcalendar select callback not firing in mobile

I am using fullcalendar version 2.9.1. I am rendering calendar as agendaWeek. When I click on specific time slot from desktop, it's firing the select callback, but when I click on the mobile device it's not. What is the problem?

     selectable:true,
     select: function(start, end, jsEvent, view) {
      // event is firing this callback
     }

I am using this in angular application using ui.calendar

like image 799
Gowri Avatar asked Mar 11 '23 15:03

Gowri


2 Answers

I think you need to tap and hold in order to select dates/slots in mobile devices... https://fullcalendar.io/docs/event_ui/longPressDelay/

like image 185
eddiriarte Avatar answered Apr 01 '23 08:04

eddiriarte


It seems that you need to set the click time.

longPressDelay: 1

example

$('#calendar').fullCalendar
  height: 'auto'
  nowIndicator: true
  defaultView: gon.default_view
  header: ''
  selectable: true
  selectHelper: true
  longPressDelay: 1
  selectConstraint:
    start: '00:00'
    end: '24:00'
...
like image 32
jojo Avatar answered Apr 01 '23 10:04

jojo