[B]BLOCKABLE EVENTS[/b]

hello team,
How to create block-able events?
1)if an event is created in a particular time slot (from a specified start time to end time) no other event can be created during that event.
2)The blocking of time slot depend on the type of event that means for a non block-able event more than one event can be created in a time slot.
Can collision.js be used to limit the number of events per time slot for a particular time period rather for entire scheduler??
I want that to limit the number of events in a time slot based on the type of event.
The events are to be loaded from a data source.

thanks
vishnupriya

collision.js will work for all events, and can’t be limited to some date range

You can use collision.js and add a custom code to the onEventCollision handler. The code in handler will receive the stack of events for that collision was detected, and can signal is it real collision or can be ignored, by returning true or false from the handler.

hello team,
i want to apply customized CSS to events based on some condition.The CSS has to be applied as the events are loaded from the datasource.so i gave the script in onEventLoading event handler but only the last returned CSS is reflected for all the events.The code i used to customize the css :

.dhx_cal_event.holiday div{ background-color:#fadcd3; text-align: center; font-size: 12px; color: black; } .dhx_cal_event.appointment div{ background-color:#6AFB92; text-align: center; font-size: 12px; color: black; }

function init(){
scheduler.attachEvent(“onEventLoading”, function(event){
scheduler.templates.event_class=function(start,end,ev){

    	if(event["blockedEventFlag"]==1){
			return "holiday";
		}else{
			return "appointment";
		}
      
	 }
    return true;
});

}
the data is loaded as json from a datasource.
thanks,
Vishnupriya.

Hi,
you don’t really need to set up “event_class” template each time on “onEventLoadung” call. Once defined before “scheduler.init();” it will be applied to all events during rendering.

hi,
is there any way to check collision in onEmptyEventClick handler.Am not using thein-built light box create the event instead a new window is opened to create an event.On closing the window the new event will be reflected in the scheduler.Is there any way to check if an event already exists in the time slot onEmptyEventClick handler before that form is shown.

Thanks,
vishnupriya