Getting map view to display only events for a specific date

Hi again!
How would I make the map view display events for a specifc day? Or rather, how would I go about making the map obey the next/previous buttons at the top of the calendar? Even a selectable date dropdown or minical in the mapview would be useful.

Also, map view js is complaining that “dp” is not declared. Any ideas?

solved the “dp” issue…

I desperately need to make the map view paginate between single days or at least display events on a per selectable day basis. PLS help!!!

There are two options

scheduler.config.map_start
scheduler.config.map_end

map view shows event which are between those dates, so changing them and calling
scheduler.setCurrentView(scheduler.getState().date);

will repaint view with new date.

the next is not tested but may solve your problem fully ( will enable day-by-day scrolling, using native prev-next buttons )

scheduler.attachEvent("onBeforeViewChange", function(od,om,nd,nm){ scheduler.config.map_start = new Date((nd||od).valueOf()); scheduler.config.map_end = scheduler.date.add(scheduler.config.map_start, 1, "day"); return true; })

hmm, tried the code you sent, but the map view now shows no events at all, and the back/forward and today buttons do nothing… :frowning: any ideas would b welcome…

to be specific, the error I get is:

[code]Webpage error details

Message: Object doesn’t support this property or method
Line: 2789
Char: 13
Code: 0
URI: extest/xmlCalendar/codebase/dhtmlxscheduler.js

[/code]

which corresponds to the line:

return scheduler.date["add_" + D](B, C, D)

in my dhtmlxscheduler.js

pls help?

Yep, above solution was not full
Add the next before scheduler.init call

scheduler.attachEvent("onBeforeViewChange", function(om,od,nm,nd){ scheduler.config.map_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"); }

AMAZING!! Love your work. I suspect this feaure could become a standard documented solution?

Only one remaining niggle; when paginating on the map, can the map markers reflect the events listed on the left hand side? How do I achieve this? Currently it seems to load the markers from the first day loaded.

Oh, and it seems adding a day adds 24hrs from now, how do I tell it to ignore time and simply display day by day?

Oh, and it seems adding a day adds 24hrs from now
to fix it , change in above code

scheduler.config.map_start = new Date((nd||od).valueOf());

as

scheduler.config.map_start = scheduler.date.day_start(new Date((nd||od).valueOf()));

Thank you!!!
That works really well now. Trying to figure out how to make the map markers only display the events listed to left of the map, but not having much luck. Is there a map refresh function hidden somewhere that I can use?

If I can get that working (maybe with your help?) and also add a date string in the header on the map view, I’m basically done! whoohooo!!!

Hello,

Try replacing dhtmlxscheduler_map_view.js with the attached one.

Best regards,
Ilya
dhtmlxscheduler_map_view.zip (4.32 KB)