Timeline with day/week/month views

The basic scheduler comes with Day/Week/Month views accessible with three buttons at top-left. I’m not interested in the basic scheduler view, I’d like to use the timeline view. I’ve created one, but it’s static.

Is it possible to have Day/Week/Month buttons loading timeline views with day/week/month ranges?

Are there some example to have as a guide?

Thx

Only to clarify, a fast manual and ugly mock-up: dl.dropboxusercontent.com/u/171 … e_zoom.jpg

I think I can archive it by two ways:

  1. Creating different timelines with scheduler.createTimelineView() with different names and switching between with scheduler.setCurrentView(null, ‘timeline_name’).
  2. Creating only one timeline and changing its configuration (x_unit, …) with scheduler.matrix[“timeline”].x_unit = “…” and scheduler.updateView().

Is this ok? I tested the method 1 and it works. Is a recommended way? Some doubts about it:

  • Is it possible to use the extension ‘active_link’ with the timeline view?
  • Is there an easy way to create the nav buttons? Is there a library/documentation about predeffined buttons (ex: day_tab, month_tab, …) ?

Thx, I’m starting to love dhtmlx… :wink:

Method (1) is better. Scheduler was designed to have multiple timelines, it will not cause any performance drawbacks.

  • Is it possible to use the extension ‘active_link’ with the timeline view?
    Version 4.0 doesn’t support it by default but we already have implemented this feature in a dev. version. It will be included in oncoming update. ( if you need it asap - please open ticket in support system )

Is there an easy way to create the nav buttons?
There is no API, by default scheduler will convert all div tags with dhx_cal_tab class to view changing buttons. The value of name attribute will be used as target view name ( so you can place there buttons for your custom modes and remove the default ones )

  • Do you have an approximate release date for this dev. version?
  • Thx for telling me about the ‘dhx_cal_tab’ class, I was using ‘scheduler.setCurrentView’ but the class seems more clean to me :slight_smile: . I tried to play with the classes ‘dhx_cal_tab_first’ and ‘dhx_cal_tab_last’ but it doesn’t work with my custom buttons :frowning:
  • I suppose the Scheduler is creating the day, week and month views by default. If I don’t use it, is it possible to not create it on init() ?

Do you have an approximate release date for this dev. version?
Scheduler 4.1 - February 2014

If I don’t use it, is it possible to not create it on init() ?
There is no extra views created, scheduler will render view only when it is visible, so you will not gain anything by disabling default views.

Thx!

Is there a easy way to position the dhx_cal_tab buttons to the left like happens with the day_tab/week_tab/… buttons automatically?

Actually they are showed like that: i.imgur.com/s2vCBsR.png

You can define the “style=‘left:XXpx’” on the related div elements
If style not provided, scheduler will auto-place buttons ( but it will do it with assumption that you have all default buttons in place )

Also, you may want to disable the fix_tab_position mode
docs.dhtmlx.com/scheduler/api__s … onfig.html

Yes, with scheduler.config.fix_tab_position = false; and setting the style=“left: XXpx;” works, but the buttons lose the style.

Without this settings: i.imgur.com/nFOjLzQ.png
With this settings: i.imgur.com/XGVdamF.png

I don’t know if it’s related, but I’m using the CSS provided here: viewtopic.php?f=6&t=34050&p=107032

Hi,
that’s expected, because the CSS classes “dhx_cal_tab_first”, “dhx_cal_tab_last”, “dhx_cal_tab_standalone” are added depending on the position if “scheduler.config.fix_tab_position = true;”. So you need to add it manually for your set of buttons.

Perfect, thx