0

Change disabled datebox style

asked 2010-04-07 02:40:47 +0800

Neus gravatar image Neus
1415 14

Hi,
Can anyone tell me how can I change the font color of a disabled Datebox. I want it black not gray. I have been able to change the background but not the font color:

.z-datebox-text-disd{
background:transparent;
}

delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest

answered 2010-04-08 11:16:04 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

updated 2010-04-08 11:16:36 +0800

Hi
I write a sample

<zk>
    <style>
    .aa.z-datebox-text-disd {
        background:transparent;
    }
    .aa.z-datebox-disd .z-datebox-inp {
        color:black !important;
    }
    </style>

    <datebox onCreate="self.value = new Date()" />
    <datebox onCreate="self.value = new Date()" disabled="true"/>
    <datebox onCreate="self.value = new Date()" disabled="true" sclass="aa"/>
</zk>



but it seem not work with IE
I will try to solve it

link publish delete flag offensive edit

answered 2010-04-08 20:42:35 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

OK
It seem a browser issue

<input  type="text" value="text" disabled="disabled" style="color:red;">

I cannot found the solution with google

link publish delete flag offensive edit

answered 2010-04-12 05:37:48 +0800

Neus gravatar image Neus
1415 14

Hey,
Thank you very much!

It's true it doesn't works with IE but better this than nothing.

If you find any solution please tell me

Thanks again.

link publish delete flag offensive edit

answered 2010-04-12 06:00:01 +0800

Neus gravatar image Neus
1415 14

updated 2010-04-12 06:00:23 +0800

I noticed it is not deep black (it seems dark grey).
I think it is because something above it is not transparent but I couldn't find what.

link publish delete flag offensive edit

answered 2010-04-12 06:12:29 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

updated 2010-04-12 06:13:20 +0800

It cause by opacity

you can try to add CSS setting

.aa.z-datebox-disd {
        opacity: 1;
	-moz-opacity: 1;
	filter: alpha(opacity=100);
    }


ZK default setting

.z-combobox-disd {
	opacity: .6;
	-moz-opacity: .6;
	filter: alpha(opacity=60);
}

link publish delete flag offensive edit

answered 2010-04-12 06:22:25 +0800

Neus gravatar image Neus
1415 14

perfect

thank you :)

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-07 02:40:47 +0800

Seen: 1,224 times

Last updated: Apr 12 '10

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