I am using solspace calendar. The weekend in our country is during Friday and Saturday. I would like to show the dates which are during the weekend in different color. Can anyone help me?

2 Answers 2


Please, try this:

{if '{event_start_date format="%w"}' > 4} class="weekend" {/if}

%w returns the day of the week, from 0, for Sunday, to 6, Saturday.

event_start_date is available on both exp:calendar:events and exp:calendar:cal.

  • Thank you for your reply. Can you please show me how to use it within exp:calendar:cal. Shall I use it between events tags
    – Seama
    Commented Dec 9, 2013 at 14:01
  • Please, edit your question and add your code. I can use it for my sample.
    – Sobral
    Commented Dec 9, 2013 at 16:46
{exp:calendar:cal calendar_id="218" enable="categories" {if segment_3 == ''} date_range_start="year-month-01" date_range_end="year-month-last" {/if} {if segment_3 != ""} date_range_start="{segment_3}-{segment_4}-01" date_range_end="{segment_3}-{segment_4}-last" {/if} } {display_each_month} {date format="%F %Y"} {display_each_day_of_week} {day_of_week_short} {/display_each_day_of_week} {display_each_week} {display_each_day} {if day_in_current_month} {date format="%j"} {if:else} {date format="%j"} {/if} {if day_in_current_month} {display_each_hour} {events} 0} index_difference_{all_day_event_index_difference}{/if} ">   {/events} {/display_each_hour} {/if} {/display_each_day} {/display_each_week} {/display_each_month} {/exp:calendar:cal}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.