scedular month color customization

I am using your month coloring template sample as a guide, and managed to color a day of the month I am interested in using a style sheet and the following class:



scheduler.templates.month_date_class=function(date,today){

     if (date.getDate()==<?php echo $LAST_DAY + 1 ?>)

                return “good_day”;    

             return “”;

        }



1. What I want is to only color that day for the current month, and not for any other months in the month view.

2. Can I put in specific header text in the top bar where the date is for this day only?



thanks,

-Mahesh


>> 1. What I want is to only color that day for the current month, and not for any other months in the month view.


The template gets the date object as the parameter. So, you can check the month of that date.


scheduler.templates.month_date_class=function(date,today){ …


>> 2. Can I put in specific header text in the top bar where the date is for this day only?


You can define both css classes:


.good_day .dhx_month_body{

}
.good_day .dhx_month_head{

}




Does:



date.getMonth()  give me the value for the month then?


I figured out the month, it is based on counting from 0-11.



For the css classed, is there an easy way to a text statement as part of the class?


>> For the css classed, is there an easy way to a text statement as part of the class?


there isn’t such a way

I’m updating this post because i don’t wanted to create a new one.

My scheduler use the new style template, and in the month view i want to change the head date color because actually, it’s the same that the date body.

So I’ve seen that in the dhtmlxscheduler.css there are several dhx_month_head mentioned, but i don’t know which one i need to replace to change this head event color. Tried several, but nothing happened.

Is this a problem with the new template system ? Is there a way to do this ?

In dhtmlxscheduler.css

header part for normal days
.dhx_month_head{

header part for dates from previous|next month
.dhx_after .dhx_month_head, .dhx_before .dhx_month_head{

header part for “today”
.dhx_now .dhx_month_head{

When you are using month date template - the class from it will be appended to the default ones, which must not break their work. To be sure that default color will be preserved , you can add !important to the style which need to be preserved.

Thanks, !important was the thing to add.

A last thing, which is not really linked to the month view, but in Year view, when my scheduler is smaller than 600px, the day line which is in the week and month view is shown in background, but not at the top of the scheduler. Can we remove it, or hide it ?

In css file, you can locate and remove

.dhx_cal_container {
background-image:url("./imgs/top-days-bg.png");