0

Calendar component's Sat and Sun in Day Of Week displayed as RED

asked 2010-04-16 01:46:16 +0800

baskaraninfo gravatar image baskaraninfo
536 2 2 9

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.

delete flag offensive retag edit

9 Replies

Sort by ยป oldest newest

answered 2010-07-20 20:43:31 +0800

samchuang gravatar image samchuang
4084 4

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>

link publish delete flag offensive edit

answered 2010-07-16 11:36:55 +0800

mguilherme gravatar image mguilherme
132 3

This is great but assuming I need to change to green some days, how do you achieve this?

link publish delete flag offensive edit

answered 2010-05-01 04:18:28 +0800

Bobzk gravatar image Bobzk
444 1 8

Many thanks.

link publish delete flag offensive edit

answered 2010-04-30 05:06:21 +0800

samchuang gravatar image samchuang
4084 4

Hi

onBind event in the ZK client side, means Dom element is ready for use

so after onBind event, you could try to get the dom element in the html

link publish delete flag offensive edit

answered 2010-04-29 03:08:19 +0800

Bobzk gravatar image Bobzk
444 1 8

Would anyone like to point me to documentation on "onBind". Googling it, reading Client Side Programming or searching in any ZK/Jquery manual seems to come up blank.

link publish delete flag offensive edit

answered 2010-04-29 01:59:01 +0800

baskaraninfo gravatar image baskaraninfo
536 2 2 9

Thank you, Samchuang :)

I will refer Client Side Programming, which seems as a must for our project.

Thanks for showing the right direction.

link publish delete flag offensive edit

answered 2010-04-26 22:07:15 +0800

samchuang gravatar image samchuang
4084 4

updated 2010-04-26 22:08:13 +0800

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>

link publish delete flag offensive edit

answered 2010-04-22 01:11:07 +0800

baskaraninfo gravatar image baskaraninfo
536 2 2 9

updated 2010-04-22 01:12:09 +0800

Sorry for the confusion. Please refer the following link:

http://www.zkoss.org/zkdemo/userguide/#f9

link publish delete flag offensive edit

answered 2010-04-18 20:23:07 +0800

samchuang gravatar image samchuang
4084 4

Hi

which part in Calendar displayed as Red, does it happen some where in Calendar demo ??

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-04-16 01:46:16 +0800

Seen: 993 times

Last updated: Jul 20 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More