You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Christopher Gardner <ch...@gmail.com> on 2007/10/13 03:40:36 UTC

Configuring DatePicker

Does anyone have any examples of configuring DatePicker?  I'd like to
limit the minimal date, for example.  I subclassed it and overrode
configure() to set what I thought the Yahoo documentation said to to
specify the minimal date, but to no avail.

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


Re: Configuring DatePicker

Posted by Gerolf Seitz <ge...@gmail.com>.
i noticed that the mindate only workeswhen the textfield contains a valid
date.
but i'd have to check again. didn't have the time to investigate further and
it was rather a bonus feature than a requirement.

  Gerolf

On 10/14/07, Kent Tong <ke...@cpttm.org.mo> wrote:
>
>
>
> Christopher Gardner-2 wrote:
> >
> > Does anyone have any examples of configuring DatePicker?  I'd like to
> > limit the minimal date, for example.  I subclassed it and overrode
> > configure() to set what I thought the Yahoo documentation said to to
> > specify the minimal date, but to no avail.
> >
>
> The code below works fine for me:
>
>         TextField d = new TextField("d");
>         d.add(new DatePicker() {
>                 protected void configure(Map widgetProperties) {
>                         widgetProperties.put("mindate", "10/3/2007");
>                         super.configure(widgetProperties);
>                 }
>         });
>
>
> -----
> --
> Kent Tong
> Wicket tutorials freely available at http://www.agileskills2.org/EWDW
> --
> View this message in context:
> http://www.nabble.com/Configuring-DatePicker-tf4616962.html#a13195942
> 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: Configuring DatePicker

Posted by Kent Tong <ke...@cpttm.org.mo>.

Christopher Gardner-2 wrote:
> 
> Does anyone have any examples of configuring DatePicker?  I'd like to
> limit the minimal date, for example.  I subclassed it and overrode
> configure() to set what I thought the Yahoo documentation said to to
> specify the minimal date, but to no avail.
> 

The code below works fine for me:

	TextField d = new TextField("d");
	d.add(new DatePicker() {
		protected void configure(Map widgetProperties) {
			widgetProperties.put("mindate", "10/3/2007");
			super.configure(widgetProperties);
		}
	});


-----
--
Kent Tong
Wicket tutorials freely available at http://www.agileskills2.org/EWDW
-- 
View this message in context: http://www.nabble.com/Configuring-DatePicker-tf4616962.html#a13195942
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