How to retrieve all events that are in FullCalendar?

1

I have a page that has a list of events that can be dragged to a FullCalendar.

After dragging all my events to FullCalendar and clicking the finish button I want to get a list, or something of that, with all events and on what date this event was placed.

How can I do this using FullCalendar in ASP.NET?

My Page (HTML)

<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="FullCalendar._Default" %>


<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <div id='wrap'>
        <div id='external-events'>
            <h4>
                Servicos Complementares</h4>
            <div class='fc-event'>
                Servico 1
            </div>
            <div class='fc-event'>
                Servico 2
            </div>
            <div class='fc-event'>
                Servico 3
            </div>
            <div class='fc-event'>
                Servico 4
            </div>
            <div class='fc-event'>
                Servico 5
            </div>
            <p>
                <input type='checkbox' id='drop-remove' />
                <label for='drop-remove'>
                    Remover após a escolha da data</label>
            </p>
        </div>
        <div id='calendar'>
        </div>
        <div style='clear: both'>
        </div>
    </div>
</asp:Content>

Please note that on this page I have (Service 1, Service 2, Service 3, etc.).

I also have a FullCalendar in <div id='calendar'> .

I drag these services (Service 1, Service 2, Service 3, etc.) into my FullCalendar, each on a specific date.

Here's how:

Now that the services are in the calendar I want, when I click on a button, get a list with the services that are in the calendar and with the respective date when each service is placed in the calendar.     

asked by anonymous 16.01.2015 / 18:27

1 answer

2

I think your best bet is not to get the events in the end, but rather to handle the events as they are inserted in the calendar. FullCalendar has a range of events that can be triggered according to your needs. Specifically the 'drop' event that triggers a function sending as parameters 'date', 'jsEvent', 'ui'. Arrange these Events into an Object and simply submit it when you finish.

Note: Also remember to treat other methods for events that are changed or removed after "dropped". Full documentation of events can be found at link

EDIT:

I made a jsfiddle from the example I mentioned ... It's not professional because I was in a hurry, but it's didactic: I made a middle fiddle in the careers, but here's an example of what I said:

link

With this created object, you transform whatever you want

    
16.01.2015 / 22:01