Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8098933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:14:18+00:00 2026-06-05T22:14:18+00:00

I am trying to use FullCalendar and it is displayed fine, with a feed

  • 0

I am trying to use FullCalendar and it is displayed fine, with a feed updating events from the database and google calendar.

However my problem is how do I have a single save button on the page which, when pressed, allows me to pass back all the events in the calendar back to my controller so I can save them to the database?

Some Code (view):

$(document).ready(function () {
    /* initialize the external events
    -----------------------------------------------------------------*/
    $('#external-events div.external-event').each(function () {
        // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/)
        // it doesn't need to have a start or end
        var eventObject = {
            title: $.trim($(this).text()) // use the element's text as the event title
        };

        // store the Event Object in the DOM element so we can get to it later
        $(this).data('eventObject', eventObject);
        // make the event draggable using jQuery UI
        $(this).draggable({
            zIndex: 999,
            revert: true,      // will cause the event to go back to its
            revertDuration: 0  //  original position after the drag
        });
    });

    // -------- Calendar set up ...
    $('#calendar').fullCalendar({
        eventSources:
        [
            { // Uk holidays
                url: 'http://www.google.com/calendar/feeds/uk__en%40holiday.calendar.google.com/public/basic',
                color: 'blue',
                textColor: 'white'
            },
            { // booked availability
                url: '/avalibility/GetAvail',
                color: 'red'
            }
     ],
    //... more set up
});

Controller code:

public JsonResult GetAvail(double start, double end)
{
    var startDateTime = FromUnixTimestamp(start);
    var endDateTime = FromUnixTimestamp(end);

    var events   = from e in db.PROJECT_CALENDAR
                        select e;

    var AvilList = new List<object>();
    foreach (var e in events)
    {
        AvilList.Add(
            new
            {
                id = e.ID,
                title = e.Title,
                description = e.Title,
                start = e.DateStart,
                end = e.DateEnd
            });
    }
    return Json(AvilList.ToArray(), JsonRequestBehavior.AllowGet);
}      
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:14:20+00:00Added an answer on June 5, 2026 at 10:14 pm

    Have you tried using the clientEvents callback? Something like this:

    var eventsFromCalendar = $('#calendar').fullCalendar( 'clientEvents');
    

    This returns a JSON array with all the fullCalendar event objects. You can pass this array over to your controller and then store them to the DB.

    Hope that helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use FullCalendar to display my events from a JSON feed. It's
I'm trying to use full calendar to load events from a json source. The
I have been trying to make the FullCalendar events use Facebox to pop up
I am trying to use a JSON feed to render events in fullCalendar. Here
I am trying to display my events from a MySQL database. I'm using the
I am trying use Thread but i have some problem (I am beginner at
I am trying use Google Maps for my work; I have downloaded an example
I am trying use gem tire to search in my application. I have tables
I'm trying use mod_rewrite to rewrite URLs from the following: http://www.site.com/one-two-file.php to http://www.site.com/one/two/file.php The
Hi I'm trying use a datepicker on a field I have. I'm trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.