public class MyDatePicker extends DatePicker
{
    private static final long serialVersionUID = 1L;

    private static final SimpleDateFormat format = new
SimpleDateFormat("MM/dd/yyyy");

    @SuppressWarnings("unchecked")
    @Override
    protected void configure(Map widgetProperties)
    {
        super.configure(widgetProperties);

        // set minimal date
        Date minDate = getMinDate();
        widgetProperties.put("mindate", format.format(minDate));

        // set maximal date
        Date maxDate = getMaxDate();
        widgetProperties.put("maxdate", format.format(maxDate));
    }
}

  Gerolf

On Mon, Apr 21, 2008 at 3:02 PM, nanotech <[EMAIL PROTECTED]> wrote:

>
> Hi All,
>
> Is it possible to programatically disable dates that have passed in
> wicket's
> date picker. for example....I want to disable all the dates before today's
> day.
>
> Can someone please give an example?
>
> Thanks,
> ~ R
> --
> View this message in context:
> http://www.nabble.com/Is-it-possible-to-disable-dates-in-Wicket-Date-Picker---tp16807706p16807706.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to