Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by rencin on Dec 29, 2009 04:59
open dhtmlx forum
how to make saturaday and sunday as idle?

Hi,

In dhtmlxscheduler,how to set saturday and sunday with a different background calendar in month view?

Also how to make saturaday and sunday as idle ? so it doesnot allow to create or schedule new appointments


regards
rencin.
Answer posted by dhxSupport on Dec 29, 2009 07:00
>>In dhtmlxscheduler,how to set saturday and sunday with a different background calendar in month view?
You can style cell in the month view with month_date_class template:
scheduler.templates.month_date_class=function(date,today){
//date - date object corresponded to cell in month view 
//today - date object corresponded to the current date
return "some_class";//function must return  name of class which will be set to the cell in month view.
}

You can find working example at your dhtmlxScheduler package dhtmlxScheduler\samples\02_customization\04_month_days_coloring.html

>>Also how to make saturaday and sunday as idle ? so it doesnot allow to create or schedule new appointments
You can use onDblClick and onBeforeDrag event to block events creation at the Saturday and Sunday.
http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxscheduler:events
Answer posted by rencin on Dec 29, 2009 19:53

hi,

how to disable saturday and sunday columns so that no new appointment or events  could be created on the doubleclick in respective columns? But Monday to friday columns should allow new appointments or event creation on  double click .

How to do this?

regards

rencin.

 

Answer posted by Stanislav (support) on Jan 04, 2010 05:23
You can just remove those days from the view, if they are not accessible

http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxscheduler:custom_views

samples\02_customization\07_custom_view.html