-
FEATURED COMPONENTS
First time here? Check out the FAQ!
As default, Calendar component's Sat and Sun in Day Of Week displayed as RED!
I need to change it to some other color.
I have tried on customizing CSS using firebug. But, I can't able to change any other color.
Any help to change the color is appreciated.
Thank you.
Hi
after zk5.0.3, you can use Renderer to do it
<?page title="new page title" contentType="text/html;charset=UTF-8"?> <zk> <script><![CDATA[ zk.afterLoad('zul.db', function(){ zul.db.Renderer.cellHTML = function (cal, y, m, day, monthofs) { return '<a href="javascript:;" style="color:red;">' + day + '</a>'; }; }); ]]></script> <calendar id="cal"> </calendar> </zk>
This is great but assuming I need to change to green some days, how do you achieve this?
Thank you, Samchuang :)
I will refer Client Side Programming, which seems as a must for our project.
Thanks for showing the right direction.
Hi
you could write client side event, please refer to Client Side Programming
<?page title="new page title" contentType="text/html;charset=UTF-8"?> <zk xmlns:w="http://www.zkoss.org/2005/zk/client"> <calendar> <attribute w:name="onBind"> var days = this.$n('mid'), $week = jq(days.firstChild).children('.z-calendar-caldow'); $week.children(':first-child').css('color', ''); $week.children(':last-child').css('color', ''); </attribute> </calendar> </zk>
Sorry for the confusion. Please refer the following link:
http://www.zkoss.org/zkdemo/userguide/#f9
Asked: 2010-04-16 01:46:16 +0800
Seen: 993 times
Last updated: Jul 20 '10