Hello,

I am looking for a calendar to use with my website that I can add tasks/appointments into the db and have them show on the calendar. I would like to edit on the fly either by using a page to create the task/appointment or via the calendar using ajax.

Thanks in advance

Patrick.

Dani AI

Generated

Short summary for (and in reply to ’s Google Calendar suggestion): if you need everything hosted and editable on your site (DB-backed tasks, create/edit from a form or the calendar via AJAX), pick a self-hosted JS calendar that supports JSON event feeds plus drag/drop callbacks. Below are practical choices, a tiny FullCalendar example, and key implementation tips.

FullCalendar is the most common choice: it supports JSON event sources, editable drag/drop, and callbacks you can use to push updates to your PHP endpoints. Minimal example (adapt to the FullCalendar version you pick):

document.addEventListener('DOMContentLoaded', function() {
  var calendarEl = document.getElementById('calendar');
  var calendar = new FullCalendar.Calendar(calendarEl, {
    initialView: 'dayGridMonth',
    editable: true,
    events: '/events.php', // returns JSON events from your DB
    eventDrop: function(info) {
      fetch('/update-event.php', {
        method: 'POST',
        headers: {'Content-Type':'application/json'},
        body: JSON.stringify({
          id: info.event.id,
          start: info.event.start.toISOString(),
          end: info.event.end && info.event.end.toISOString()
        })
      }).then(r => { if (!r.ok) info.revert(); });
    }
  });
  calendar.render();
});

FullCalendar is well-documented and flexible for PHP backends. (github.com)

Other solid, self-hosted alternatives: TOAST UI Calendar (feature-rich, MIT-licensed, built-in popups and multiple views) and DayPilot Lite (open-source under Apache 2.0 with demos/tutorials and PHP sample projects). TOAST UI is great if you want ready-made UI popups; DayPilot is handy if you want sample server code to copy. (github.com)

Implementation tips: return events as JSON (id, title, start, end), accept FullCalendar’s start/end request params, format dates in ISO8601 or timestamps, and use the library’s callbacks (eventDrop/eventResize) to persist changes. Handle time zones explicitly, secure endpoints (auth + CSRF), and treat recurring events as a special case (generate instances server-side or use a recurrence library). For a quick PHP starter, DayPilot’s PHP samples are useful. (fullcalendar.io)

These options let you keep tasks in your DB and edit them from a form or directly on the calendar via AJAX—pick the one whose UI and license match your project and copy one of the sample server endpoints to get started quickly.

Recommended Answers

All 2 Replies

Ive looked at that. But I dont want to have to go to a third party app to update the tasklist/appointments. I would like to do it all from the website.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.