You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by rawe <ra...@dachser.com> on 2010/06/08 16:11:52 UTC

Re: DatePicker configuration isn't always working

Did you already solve your problem?
I got the same problem.

Thanks for any help!

Ralph Weyers
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/DatePicker-configuration-isn-t-always-working-tp1878188p2247457.html
Sent from the Wicket - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: DatePicker configuration isn't always working

Posted by rawe <ra...@dachser.com>.
Yes, I solved it!
When displaying the calendar the first time it's mandatory to call its clear
method
(Clears the selected dates in the current calendar widget and sets the
calendar to the current month and year. )

My solution:

@Override
protected String getAdditionalJavascript() {
	if (additionalJavascript == null)
		additionalJavascript = "";

	StringBuilder sb = new StringBuilder();

        sb.append("${calendar}.addRenderer(\"6/10\",
${calendar}.renderBodyCellRestricted);");
	sb.append("${calendar}.clear();");

        additionalJavascript += sb.toString();

	return additionalJavascript;
}
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/DatePicker-configuration-isn-t-always-working-tp1878188p2250089.html
Sent from the Wicket - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org