-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have two Dateboxes one of them with constraint something like this
<label sclass="labelNormal" value="InitialDate" />
<datebox id="from"/>
<label sclass="labelNormal" value="FinalDate" />
<datebox id="to" constraint="${dualDateValidatorWithRange}"/>
The constrains validate that from date is less than to date if not a wrongValueException takes place the constraint works ok the problems arises i have a button which clears all the inputElements in my view when the constraint is fire and later i click on the button clear i couldn't find a way to clear the value or text or any from to datebox i have try in ZUL and in a Java class the following code with not success.
to.setValue(null);to.setRawValue(null);to.setText(null);
But i still can see the last selected date on the datebox what else can i do to erase all the value and text from datebox.
I have create a fiddle sample here
http://zkfiddle.org/direct/lu9c0j/5/v7.0.6.1-ClearDateboxWithConstraintNotWorking?run=13jmcku
Hello javiut,
If you had shared the code i could help even more but you try disabling the constraint, set the new value (empty string), and re-enable the constraint.
Let me know how it went.
Best Regards,
Darksu
Changed the order of the clearance to :
to.setRawValue(null);
to.setText(null);
to.setValue(null);
Greetz chill.
Asked: 2015-09-29 13:06:17 +0800
Seen: 22 times
Last updated: Sep 29 '15
wrong valueException come in front of modal popup [closed]
Use parameters in a conditional @command
Problems with multiple press and onCtrlKey
MVVM @save on the fly [closed]
Unable to activate destroyed desktop
org.zkoss.zk.ui.UiException: java.lang.ClassNotFoundException
How to put a image or Letter over image on a specific XY Coordinate
javiut, is your other question duplicate or not?
chillworld ( 2015-09-30 09:32:42 +0800 )editIs not..best regards chillworld
javiut ( 2015-09-30 11:07:05 +0800 )edit