FYI

On 5/15/07, Francisco Diaz Trepat - gmail <[EMAIL PROTECTED]>
wrote:

Hi I have the following TextField and DatePicket.

When I submit I get a validation of type: '15.05.1959' is not a valid
Date.

        //create textfield - validate it with the Date type
        TextField dateOfBirth = new TextField("dateOfBirth", Date.class);
        //add a validator for range between a person born a maximum of 100
years ago and today
        
dateOfBirth.add(DateValidator.range(getMinimumDateAllowedForDateOfBirth(),
getMaximumDateAllowedForDateOfBirth()));
        //set also as required
        dateOfBirth.setRequired(true);
        //add the textfield
        form.add(dateOfBirth);
        //Create DatePicker
        DatePicker datePicker = new DatePicker("datePicker",
dateOfBirthLabel, dateOfBirth);
        //create date converter
        DateConverter dateConverter = new DateConverter();
        //Set the DateFormat and Locales
        dateConverter.setDateFormat(getWicketSession().getLocale(), new
SimpleDateFormat(" dd.MM.yyyy"));
        //asign the converter to the date picker
        datePicker.setDateConverter(dateConverter);
        //Add the datepicker
        form.add(datePicker);



What Am I missing, can't see it.

f(t)


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to