• Hi

    I would like to add the following property

    data-toggle="modal"

    to the A tag link for all events in the calendar.

    After looking at the fullcalendar documentation I noticed that you can add your own non-standard fields to each Event Object. In wp-fullcalendar.php the $item array holds these details (as shown here)

    $item = array (
    "title" 	=> $title,
    "color" 	=> $color,
    "start" 	=> date('Y-m-d\TH:i:s', $post_timestamp_start),
    "end"		=> date('Y-m-d\TH:i:s', $post_timestamp_end),
    "url" 		=> get_permalink($post->ID),
    "post_id"	=> $post->ID
    );

    but I cannot seem to add an extra property here, it doesnt show up in the html page.

    Do you know what I have to do to achieve this?

    http://wordpress.org/extend/plugins/wp-fullcalendar/

Viewing 1 replies (of 1 total)
  • Thread Starter gyroscopic

    (@gyroscopic)

    I figured this out while tinkering with wp-fullcalendar.php and after reading the fullcalendar documentation further. So I’ve documented it here in case it can help someone.

    In wp-fullcalendar.php in the footer_js() function I added the following…

    element.attr('data-toggle', 'modal');

    …to the event.render: section of the script, after the ‘if’ statement for the qtips test (instead of trying to add it to the $item array).

    This works to bring the modal up when the event is clicked. I now need to stop the default modal trigger and fire my own event which will populate the modal box with the post data.

    More reading I guess as, at the moment, I cant get the manual trigger to work because the default trigger fires before mine. If anyone knows how to hijack the fullcalendar event trigger please let me know!

Viewing 1 replies (of 1 total)
  • The topic ‘How can I add another property to the a tag for an event link’ is closed to new replies.