Skip to main content

Hi Everyone.

 

I have a calendar control and I would like to do 2 things with it :

 

1. Not allow user to choose a date in the past. (Disable dates that are in the past)

2. Make the colors of the days that fall in a weekend a different color (i.e Saturday and Sunday must be a different color in my calendar).

 

Hi MoMapaela

 

1. You cannot disable past dates using the calendar control properties. What you can do is run a rule on the changed event of this control to check if the date is in the past (use an advanced condition), and if so then remove the value (transfer data) and show the user a message.

 

2. Again there is no property to set on a calendar control to make weekdays a different colour to weekends. You may be able to achieve this by making changes to the CSS/Theme. If you examine the calendar control you will see that each day is an anchor tag that has a class such as class="day xy_0_3". If you can work out the pattern (it looks like the first number in the class represents the day of the week, and the second number the week of the month, so anything with 5 or 6 as the first number will be Saturday/Sunday) then you may be able to apply a different style to those elements.


Thanks a lot . I will defintely look into that 


Reply