Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

155
Views
Custom button not clickable on full calendar event with mobile devices

I'm using full calendar with a custom event view (its almost the same as the default but I only added a button to delete the event

enter image description here

        eventDidMount: function(eventDidMountInfo) {
          var $deleteBtn = $(eventDidMountInfo.el).find('button')
          if(eventDidMountInfo.event.extendedProps.can_edit_event) {
            $deleteBtn.on( "click", function(argument) {
              deleteTimeSlot(calendar, eventDidMountInfo.event)
            })
          } else {
            $deleteBtn.remove()
          }
        },
        eventContent: function(info) {
          return {
            html: '<div class="fc-event-main-frame"><div class="fc-event-time">' + info.timeText + '<button type="button" class="btn-close float-end m-1" aria-label="Close"></button></div><div class="fc-event-title-container"><div class="fc-event-title fc-sticky">' + info.event.title + '</div></div></div>'
          };

this works well on pc, I manage to delete events without an issue, the issue is on mobile, the event isn't firing.

I'm guessing there is something to do with the full calendar feature long press on mobile?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Mobile devices use the Touch Events API, not normal click events.

So we have to use both .on( 'click' ) and .on( 'touchstart' ); to be compatible with both PC and some mobile devices.

https://developer.mozilla.org/en-US/docs/Web/API/Touch_events

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!