two sets of start and end dates for same calendar

In my xml file I have two sets of start and end dates for each event.

Set 1 is the normal start_date , end_date

Set 2 simulates all-day event (full day) except where event is multi-day

I would like to use the dates from Set 2 to force displaying events as full day events in Timeline view, but use Set 1 dates everywhere else in the calendar…

If this is not possible, how can I modify timeline js script to always display events as if they were full day events?

in _timeline.js ( you can use uncompressed version, ext_matrix.js , from sources folder )

function _getX(ev, isEndPoint, step) {

Above methods receive event and returns their x coordinate on the screen.
You can alter it, so it will return values based on your second set of dates

Thank you!

I just remembered I wanted ask another question:

How do I show the date next to the today button on the map view? The pagination is working lovely, but I can’t see which day I’m looking at?

Will let you know how the mod of matrix goes…

Something like next can be used

var format = scheduler.date.date_to_str("%d %m %Y"); scheduler.templates.map_date = function(dd,ed,mode) { return format(dd); };

It will not help in case of default scheduler 2.3, but will work for updated map extension.

made the change as follows:

function _getX(ev, isEndPoint, step) { var x = 0; var date = (isEndPoint) ? ev.timelineend : ev.timelinestart; if(date.valueOf()>scheduler._max_date.valueOf()) date = scheduler._max_date; var delta = date - scheduler._min_date_timeline; if (delta<0) { column_offset = 0; } else { var index = Math.round( delta/(step*scheduler._cols[0]) ); // results varies ~0.9 - ~24.17, e.g. that way we get 1 and 24 if(index>scheduler._cols.length) // if columns really small it's possible to get incorrect index index = scheduler._cols.length; for (var k=0; k<index; k++) { x += scheduler._cols[k]; } var column_date = scheduler.date.add(scheduler._min_date_timeline, scheduler.matrix[scheduler._mode].x_step*index, scheduler.matrix[scheduler._mode].x_unit); delta = date - column_date; var column_offset = Math.floor(delta/step); } x += (isEndPoint) ? column_offset-14 : column_offset+1; return x; }

but the events now overlap each other across days… hmm. some more experimentation needed methinks… good start for me to build on though.

probably you need to filter the next line in y_scale method as well

while (stack[stack_pointer] && stack[stack_pointer].end_date > ev.start_date)

the map code I am using now looks like this:

[code]
//map config

	scheduler.xy.map_date_width = 100; // date column width
		scheduler.xy.map_description_width = 300; // description column width
		
		scheduler.config.map_inital_zoom = 8;
     scheduler.attachEvent("onBeforeViewChange", function(om,od,nm,nd){
        scheduler.config.map_start = scheduler.date.day_start(new Date((nd||od).valueOf()));
        scheduler.config.map_end = scheduler.date.add(scheduler.config.map_start, 1, "day");
        return true;
     });
     scheduler.date.add_map = function(date, inc){
        return scheduler.date.add(date, inc, "day");
     }

     var format = scheduler.date.date_to_str("%d %m %Y");

scheduler.templates.map_date = function(dd,ed,mode) {
return format(dd);
};[/code]

Thank you for the sample code, but:

Still, no date showing in navline on map view :frowning:

Still using updated map view with pagination as you can see…

aha, figured out what is now causing the overlap (which was greatly reduced by your code mods, thank you!). It appears the events are now the exact length they have to be to fit the entire event_text in. I have obviously made a booboo in the css somewhere.

Try to use the attached js file instead of the original one.
dhtmlxscheduler_map_view.zip (4.55 KB)

Hi, yes that got a date into the navlin on map view,
but it displays like “25 01 2011” but on other views it is “25 Jan 2011”

How do I make it display lik the other views?
I have tried %d/%m/%Y in the format function but that just gives me “25/01/2011”…

Is there documentation on forcing date formats?

docs.dhtmlx.com/doku.php?id=dhtm … ngs_format

oops, I missed that page… sorry to be stupid.

That is all lovely now. Phew! I can’t believe how great you guys are!