disable new event creation on saturdays and sundays

Hi

In dhtmlxscheduler ,we need to disable new event creation on saturdays and sundays
Also events should be displayed in different colors in month/week/day view based on the criteria from database.
How to do this?

thank you.
rencin.

I think u need to modified the library since I had also disabled all the weekends.

scheduler._reset_scale = function () {
.
.
.

for (var L = 0; L < E; L++) {
this._cols[L] = Math.floor(I / (E - L));
this._render_x_header(L, C, O, M);
if (!this._table_view) {
var F = document.createElement(“DIV”);
var B = “dhx_scale_holder”;
if (O.valueOf() == N.valueOf()) {
B = “dhx_scale_holder_now”
}
F.className = B + " " + this.templates.week_date_class(O, N);

        /****add by me*****/
        if(O.getDay() == 0) {	//sunday
		F.className = 'blocksun';
		F.id = 'sundaydiv';
		F.innerHTML = 'SUNDAY';
		F.align = 'center';
		
    }
        .
        .
        .
        .