search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Backend Database

Asked by MJ
8 years ago.

I am trying to get DayPilot to retrieve data from a back end database and trying to follow the examples (which use jquery). At the back end the pages are ASP as I have no experience of PHP. Please could you provide the format of the data returned by backend_events.php as no matter what I try the local javascript just does not work after the call to dp.events.list = data;.

Answer posted by Dan Letecky [DayPilot]
8 years ago.

The format of the array items is described here:

http://api.daypilot.org/daypilot-event-data/

See also the following tutorial, it includes PHP and ASP.NET MVC versions of the project:

http://code.daypilot.org/17910/html5-event-calendar-open-source

Comment posted by MJ2
8 years ago.

I use classic ASP not .NET so the examples are not so useful. Most useful would be an example of exactly what should be returned by the back end ASP page for the dp.events.load to work?

Comment posted by Dan Letecky [DayPilot]
8 years ago.

It should look like this:

[
  {
    "id":"5",
    "text":"Calendar Event 5",
    "start":"2014-02-25T10:30:00",
    "end":"2014-02-25T16:30:00"
  },
  {
    "id":"6",
    "text":"Calendar Event 6",
    "start":"2014-02-24T09:00:00",
    "end":"2014-02-24T14:30:00"
  },
  {
    "id":"7",
    "text":"Calendar Event 7",
    "start":"2014-02-27T12:00:00",
    "end":"2014-02-27T16:00:00"
  }]

That is, an array of event data objects in JSON format. The following event data object properties are required:

  • id
  • text
  • start
  • end
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.