Ask A Question


You’re not receiving notifications from this thread.

Rails Full_Calendar Implementation

Lee Terng Gio asked in Rails

I'm implementing full_calendar for my Rails app. I follow the tutorial which can be found on Youtube, I've changed some javascript code as below:

$(document).ready(function() {
   //doing something here

The calendar shows up and everything is fine, then I add whatever the remaining code inside and here it is:

$(document).ready(function() {
     header: {
        left: 'prev,next today',
        center: 'title',
        right: 'month,agendaWeek,agendaDay'
      selectable: true,
      selectHelper: true,
      editable: true,
      eventLimit: true,
      events: '/events.json',

      select: function(start, end) {
        $.getScript('/events/new', function() {
          $('#event_date_range').val(moment(start).format("MM/DD/YYYY HH:mm") + ' - ' + moment(end).format("MM/DD/YYYY HH:mm"))
          $('.start_hidden').val(moment(start).format('YYYY-MM-DD HH:mm'));
          $('.end_hidden').val(moment(end).format('YYYY-MM-DD HH:mm'));
      eventDrop: function(event, delta, revertFunc) {
        event_data = { 
          event: {
            start: event.start.format(),
            end: event.end.format()
            url: event.update_url,
            data: event_data,
            type: 'PATCH'

      eventClick: function(event, jsEvent, view) {
        $.getScript(event.edit_url, function() {
          $('#event_date_range').val(moment(event.start).format("MM/DD/YYYY HH:mm") + ' - ' + moment(event.end).format("MM/DD/YYYY HH:mm"))
          $('.start_hidden').val(moment(event.start).format('YYYY-MM-DD HH:mm'));
          $('.end_hidden').val(moment(event.end).format('YYYY-MM-DD HH:mm'));

The modal form doesn't show up. What am I missing?


Any errors in console log that might be of help?


There was no errors. The modal just doesn't show up.

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 81,149+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2024 GoRails, LLC. All rights reserved.