Calendar custom options

(3 posts) (2 voices)


  1. duane, Member

    Hi. The calendar options are working great, I'm just wondering how customisable they are.

    I'm trying to make a 3-day week view like they have as an example at

    (links to and the code in code pen is at )

    In the mydbr report code I tried the following, but it didn't work (I define the view then set it as default then reference it in the header). I'm guessing the view definition either is wrongly formatted.

    SELECT 'dbr.calendar.options', 'views', "timeGridThreeDay: {type: 'timeGrid', duration: { days: 3 }, buttonText: '3 day'}"; SELECT 'dbr.calendar.options', 'defaultView', 'timeGridThreeDay'; SELECT 'dbr.calendar.options', 'headerToolbar','{"left":"timeGridThreeDay,listWeek,timeGridWeek,timeGridDay","center":"","right":""}';

    Also note that in the documentation, the 'header' option has been updated in FullCalender 5 as 'headerToolbar' instead with values for the view buttons as dayGridMonth,timeGridWeek,timeGridDay,listWeek. Also the left,centre,right has been modernised to be start,center,end for RTL languages but the mydbr extension doesn't seem to recognise these (left,center,right still work). More changes from v4 to v5 are at

  2. myDBR Team, Key Master

    run the updater and you will be able to use custom views. Also, be careful with the single and double quotes as myDBR converts the options as JSON which will require double quotes.

    SELECT 'dbr.calendar.options', 'views', '{
    "timeGridThreeDay": {
    "type": "timeGrid",
    "duration": {
    "days": 3
    "buttonText": "3 day"
    SELECT 'dbr.calendar.options', 'initialView', 'timeGridThreeDay';
    SELECT 'dbr.calendar.options', 'headerToolbar','{
    "left": "prev,next",
    "center": "title",
    "right": "timeGridDay,timeGridThreeDay"

    myDBR Team

  3. duane, Member

    Thanks! Works perfect - and goo to know about the quotes - I didn't realise json was so specific with them.


You must log in to post.