Units view in multi days mode: Many bugs!!!

1° The title of the view is not correct.

This bug is visible in your example
docs.dhtmlx.com/scheduler/sample … _days.html

The view really shows data between 30 jun 2014 and 06 jul 2014 and the title says “30 Jun 2014 to 27 Jul 2014”.
For the title, each “section” column is a date. (4 sections * 7 days = 28 days intervals).

I try to change title with

scheduler.templates.unit_date = function (start, end) { … };
or
scheduler.templates.week_unit_date = function (start, end) { … };
or
scheduler.templates.single_unit_date = function (start, end) { … };

None of these functions is called.

scheduler.templates.week_date = function (start, end) { … };
is called, but the end date does not match the real end date

2° Unable to color the weekend

In standard views “day” and “week”, I use this to color the weekend

scheduler.templates.week_date_class = function (date, today) {
if (date.getDay() == 0 || date.getDay() == 6)
return “weekday”;
return “”;
};

It does not work in the view unit in multiday, Probably for the same reason that the point 1. each “section” column is a new date.

3° the method checkInMarkedTimespan not work with sections

I create MarkedTimeStamp like this

var options = {
start_date: …,
end_date: …,
css: “mycss”,
type: “mytimespan”,
html: …,
sections: {
doctor_5: “ABC”,
doctor_10: “ABC”
}
};
scheduler.addMarkedTimespan(options);

when i use

scheduler.checkInMarkedTimespan(scheduler.getEvent(id), “mytimespan”)

or

scheduler.checkInMarkedTimespan({
start_date: …,
end_date: …,
section_id: ‘doctor_5’
}, “mytimespan”)

checkInMarkedTimespan return always “false”

But, if I create MarkedTimeStamp like this

var options = {
start_date: …,
end_date: …,
css: “mycss”,
type: “mytimespan”,
html: …,
};
scheduler.addMarkedTimespan(options);

checkInMarkedTimespan return then good result but graphically the MarkedTimespan are not drawn by section

Hi,
thanks for the feedback.
We’ve confirmed issues, we expect them to be fixed today. I’ll give you an update when it’s done

I’ve sent you an updated evaluation build.
Regarding the bugs

  1. should be fixed

  2. week_date_class defines a class of a ‘units’ headers screencast.com/t/wEwHIbZF , and still receives a dates as an argument. This is an old issue which also exists in a units view.

In order to highlight the day headers (upper row) in multiday units view, please use following template. It should receive a valid arguments now
docs.dhtmlx.com/scheduler/api__s … plate.html

  1. Could not reproduce the problem. Make sure you specify ‘sections’ property correctly. It takes a view name as a property names, and a section key (or array of section keys) as a values

E.g. following timespan can be added to the online example

scheduler.addMarkedTimespan({ type:"my_timespan",// or "dhx_time_block" start_date: new Date(2014, 6, 1, 8, 0), end_date: new Date(2014, 6, 1, 15, 0), sections: {'week_unit':1 } });

and following checking will returns true, as expected

scheduler.checkInMarkedTimespan({ start_date: new Date(2014, 6, 1, 9, 0), end_date: new Date(2014, 6, 1, 14, 0), section_id: 1 }, "my_timespan");

Hello, i tested de new version:

  1. works fine.

  2. Not work, i want highlight de section colomn, for week end, not the day hearder.
    oh well,I do otherwise, I hide weekends like this

scheduler.ignore_doctor_10 = function (date) {
if (date.getDay() == 6 || date.getDay() == 0) //hides Saturdays and Sundays
return true;
};

3)Not work

This is my code:
I have a array that contains the marked timespans

var arrPlageConvoc = [
[new Date(2015,4,1,8,0),new Date(2015,4,1,16,0),“Administrator”,“ADM”]
,
[new Date(2015,4,1,9,0),new Date(2015,4,1,13,0),“Valérie”,“VEB”]
,
[new Date(2015,4,4,8,0),new Date(2015,4,4,16,0),“Administrator”,“ADM”]
,
[new Date(2015,4,4,9,0),new Date(2015,4,4,16,0),“Damien”,“DVH”]
,
[new Date(2015,4,4,9,0),new Date(2015,4,4,16,0),“Eveline Rammer”,“RAE”]
,
[new Date(2015,4,4,9,0),new Date(2015,4,4,16,0),“Valérie”,“VEB”]
,
[new Date(2015,4,5,8,0),new Date(2015,4,5,16,0),“Administrator”,“ADM”]
,
[new Date(2015,4,5,9,0),new Date(2015,4,5,16,0),“Damien”,“DVH”]
,
[new Date(2015,4,5,9,0),new Date(2015,4,5,16,0),“Eveline Rammer”,“RAE”]
,
[new Date(2015,4,5,9,0),new Date(2015,4,5,16,0),“Valérie”,“VEB”]
,
[new Date(2015,4,6,8,0),new Date(2015,4,6,16,0),“Administrator”,“ADM”]
,
[new Date(2015,4,6,9,0),new Date(2015,4,6,16,0),“Damien”,“DVH”]

];

then i addthe marked timespans like this:

for (var i = 0; i < arrPlageConvoc.length; i++) {
var options = {
start_date: arrPlageConvoc[i][0],
end_date: arrPlageConvoc[i][1],
css: “plage_convoc”,
type: arrPlageConvoc[i][3],
html: arrPlageConvoc[i][2],
sections: {
‘doctor_5’: arrPlageConvoc[i][3],
‘doctor_10’: arrPlageConvoc[i][3]
}
};
scheduler.addMarkedTimespan(options);
}

When i check like this

var event = scheduler.getEvent(id);
var start_date = event.start_date;
var end_date = event.end_date;
scheduler.checkInMarkedTimespan({
start_date: start_date,
end_date: end_date,
section_id: ‘doctor_10’
}, “ADM”);

or like this

scheduler.checkInMarkedTimespan(scheduler.getEvent(id), “ADM”);

i receive always “false”.
I need a solution for this problem

Hi,
what are ‘doctor_10’ and ‘doctor_5’ in your code? Is it name of the view or a value of the section?

Here you use it as a name of the view:

sections: { 'doctor_5': arrPlageConvoc[i][3], 'doctor_10': arrPlageConvoc[i][3] } }; scheduler.addMarkedTimespan(options); }
And here as a value of the section:

scheduler.checkInMarkedTimespan({ start_date: start_date, end_date: end_date, section_id: 'doctor_10'

The timespan configuration should specify to which sections of which view the marker should be applied. Usually the ‘sections’ property looks like following:

sections: { "weekly_unit":"section_1" }
Where “weekly_unit” is a value of a “name” property of Units view config.

And the event object contains a value of a section: "section_id":"section_1"
Please attach a complete html example so i could test it locally