DocCalendar

DocCalendar

DocCalendar is a simple and versatile Calendar snippet for displaying events calendar of Ditto or DocLister resources.
DocCalendar  is based on FullCalendar, a cool opensource javascript event calendar https://fullcalendar.io/

DocCalendar Parameters

You can customize your calendar using a big set of parameters included in DocCalendar

Snippet Parameters

  • calID : 'DocCalendar'; unique id of your calendar (required for multiple calendars in one page)
  • Modal : '0'; Enable Modal (only Bootstrap modal for now, jquery modal will be added in next version)
  • ModalTpl: ModalTpl ; modal chunk template
  • jQuery: '1' ; load jquery js in your template
  • LoadAssets : '1'; load FullCalendar js in your template - with multiple DocCalendar calls on the same page, you need load FullCalendar (and jquery)  package just one time.

FullCalendar parameters (more infos and doc at fullcalendar.io/docs/)

  • locale : 'eng'; your calendar language
  • views : 'agendaDay,agendaWeek,month'; available views: agendaDay,listDay,agendaWeek,listWeek,month
  • defaultView : 'month';
  • headerButtons : 'prev,next'; available buttons: prev,next today
  • listDaytext : 'list Day'; translation for listdays button
  • listWeektext: 'list Week';  translation for listWeektext button
  • dow : '1, 2, 3, 4, 5, 6, 7'; // days of week. an array of zero-based day of week integers (0=Sunday)
  • startTime : '08:00'; // a start time (10am in this example)
  • endTime  : '21:30';// an end time (6pm in this example)
  • minTime : '08:00:00';
  • maxTime : '22:30:00';
  • navLinks  : 'false';
  • eventLimit  : 'true';
  • editable : 'false';

Ditto DocLister available Parameters

  • tpl 
  • debug 
  • paginate
  • parents
  • dateFormat
  • depth
  • sortBy
  • sortDir
  • total
  • hideFolders

Chunks and tvs included in the package

  • BlogCalendar: calendar tpl (with createdon/publishedon as source date) to create blog archives calendars
  • EventCalendar: calendar tpl (with tvs as source date) to create events calendars
  • Event-Start-Date: datew tv for events calendars 

Using different Date source

If you want to use editedon instead createdon date, just open DocCalendar-Tpl and replace 

start: '[+date+]',

with 

start: '[+editedon:date=`%Y-%m-%dT%H:%M:%S`+]',

Using tvs for Date source

For Events Calendars like courses, events, bookings.. you can set both start date and end date of any event:

Check the included EventCalendar chunk template for a more detailed example

Important: set date-format for both tvs to %Y-%m-%dT%H:%M:%S

in your Calendar tpl: 

start: '[+Start-Date+]',
end: '[+End-Date+]'

 

Usage

Basic call 

[!DocCalendar!]

Advanced call 

[!DocCalendar? &parents=`121,102,122` &tpl=`BlogCalendar-Tpl`!] 

Demo

[!DocCalendar? &calID=`demo` &parents=`121,102,122` &tpl=`BlogCalendar-Tpl` &jQuery=`1`!] 

 

Demo with Modal

[!DocCalendar? &calID=`demo2` &parents=`121,102,122` &tpl=`BlogCalendar-Tpl` &Modal=`1` &ModalTpl=`Modal-DocCalendar` &jQuery=`0` &LoadAssets=`0`!] 

 

Comments