Datebox: readonly and ALT+DOWN
8 Feb 2012 08:45:03 GMT
8 Feb 2012 10:25:54 GMT
8 Feb 2012 10:25:54 GMT
index.zul
Use disabled="true" and modified disabled css to look like read only.
index.zul
<zk>
<style>
.z-datebox-disd,
.z-datebox-focus .z-datebox-disd {
opacity: 1;
-moz-opacity: 1;
filter: alpha(opacity=100);
}
.z-datebox-text-disd {
background-color: #FFFFFF;
color: #000000 !important;
}
</style>
<zscript>
Date ddd = new Date();
</zscript>
<datebox value="${ddd}" disabled="true" buttonVisible="false"/>
<datebox value="${ddd}" readonly="true" buttonVisible="false"/>
<datebox value="${ddd}" buttonVisible="false"/>
</zk>
ZK - Open Source Ajax Java Framework
Hello.
I use a datebox component just for show user date value. User can change it value only by click button.
I use this code
but if user click on datebox and press ALT+DOWN he can change value as if he had pressed the button.
how can i prevent this modification?
I see only one way, it's use
but in GUI it looks not good