Timeline Tab not displaying events

Hi all,

I’m very new to this, so apologies for my lack of knowledge. I’ve been working on an event schedule and everything is working fine except that I’ve added a new Timeline view and when I add an event, it saves in the database, displays on tabs day, wee, and month, but it doesn’t display on my timeline tab. Does anyone have any idea why this might be happening? I’m tearing my hair out with this.

Below is the url to see what I mean: There should be a test event displaying in all tabs except the timeline tab.

Thanks in advance for your help. I’ve also attached my html page.

theppcpresents.com/schedule … lines.html
05_week_lines.zip (1.75 KB)

In timeline’s configuration you have

y_property: "section_id"

You need to have the property with the same name in the database and in the list of fields in the render_table or render_sql command.

Hi Stanislav,

thanks for replying and for your advice. I’ll have to look into this a bit more as I’m still struggling. I added what you advised and it still didn’t work? Do I have to add anything in the HTML page or just in the php page? Thanks again for your help.

It doesn’t look so
theppcpresents.com/schedule … 2089390134

That is data feed, used by the scheduler. There is no “section_id” value in the list of fields. Are you sure that you have added it to the list of fields in the render command ? Can you provide the code of connector, where table and fields are configured.

Hi Stanislav,

ah yes I can see it isn’t going in there. I have now added the sections in there, but it still won’t show under timeline. I have attached a .zip of the files (php and .html). I’m sure It’s a silly mistake on my part, but I’ve been trying to fix this issue for 2 days straight and I’m ready to pull my hair out!

I’ve gone to the url you sent and I can see section added now, but it doesn’t display anything? Thanks again for your help on this.

theppcpresents.com/schedule … 2089390134
06_timeline.zip (2.61 KB)

Hi Stanislav,

I finally managed to fix it!!! :smiley: :smiley: :smiley: :smiley: :smiley:

Thanks so much for your help on this and for pointing me in the right direction. Now all I have to do is figure out how to change the colour of the different events and I’ll be sorted!

You can add property color to the list of fields in render command and in to a database. After that you can store colors in a database ( in css compatible format - “red” or “#ff0033”)

Hi Stanislav,

I need your help again!! I’m trying to add different colors for the different timeline sections. Below is the updated url. What I need to do is make all events for edit 1 green, all events for edit 2 purple etc. I’m able to change the colors if I code it directly into my html page, but I want the colors to stay the same when adding a new event. At the moment it always stays as the default color. Your help would be greatly appreciated again!

PS. My skills are very beginner, so if you can guide me in the right direction with where I have to put the code in the page or DB that would be really helpful! Thanks so much :slight_smile:

Sorry, the url is:


I’ve looked at this and I’m confused as I don’t want to add it into the html page directly as otherwise the colors won’t stick when I add a new event.

docs.dhtmlx.com/scheduler/custom … color.html

You are mixing two concepts.
If you are using event.color - you need not event_class template. “color” property of template will be always used as color of event - it can be used to make per-event coloring. Also it is a good way for the case where user can select a custom color.

If you need to color events based on their properties ( different colors for different sections ) - you need to use event_class template, and do not use event.color

Hi Stanislav,

thanks for your advice, but I’m still stuck! :cry: Below is the updated version I have. As you can see the colors are different on each section, however this is only because I have a dropdown in the lightbox which the user can choose the color. What I need to do is make each edit section the default color, so that whenever someone adds a new event to that specific section it will automatically be that color. At the moment the user has to choose the color in the lightbox.


  • remove color property from connector and code
  • change event_class template like next

scheduler.templates.event_class=function(start,end,event){ return "color"+event.section_id; }

  • add css classes for each section

<style> .dhx_cal_event_line.color1{ background #e42222 } .dhx_cal_event_line.color2{ background #e422c2 } </style>

Stanislav you’ve just made my day!! :smiley: :smiley: :smiley: :smiley: Thank you so much, it works! I hope you don’t mind if I post again for more advice when I need it!

Hi Stanislav,

I’m hoping you can help me with my next issues!

Everything is working correctly, however I’ve added a new tab bar called “GFX” and I’m trying to get the colors to be the same when adding an event to this page. At the moment the color is default and isn’t the same color as the timeline tab. The only thing that works is the Holiday color which is black. Below is what I mean:

theppcpresents.com/schedule … _main.html

Thanks in advance!

You are using different property name for the second timeline
Try to change the template like next

scheduler.templates.event_class=function(start,end,event){ return "color"+event.section_id+" "+"color"+event.section1_id; }

Genious! Thanks very much! :smiley: I feel bad for always asking, but I’ve been struggling on my own with this. Do you know if there’s a way of having a 5 day week instead of 7 day week and having sat and sun as different columns with a different nav title?

Also, I need to be able to copy and paste an existing event, and after looking through the forums etc I still can’t figure it out.

Thanks a lot!

You use custom view or custom scales functionality

docs.dhtmlx.com/scheduler/custom … tepexample

As for copy-paste - check keyboard navigation extension
docs.dhtmlx.com/scheduler/keyboa … ation.html