That way it is only used to format the string to the screen.
The dateformatter is used to get the format out and _javascript_ dateformat is generated based on that

That dateformatter should also be used by the textfield itself to handle the formatting both ways.
So override the getConverter() of the exp textfield and return als your converter (that has to work 2 ways then!)

johan


On 8/11/06, kurt heston <[EMAIL PROTECTED]> wrote:
I'm trying to create a field that allows filling in of a credit card
expiration date using 1.2.  What did I miss?

Code:

      TextField exp = new RequiredTextField("expiration");
      DatePicker picker = new DatePicker("expirationDatePicker", exp);
      DateConverter conv = new DateConverter();
      conv.setDateFormat(Locale.getDefault(),new
SimpleDateFormat("MM/yyyy"));
      picker.setDateConverter(conv);
      add(exp);
      add(picker);

Exception:

    wicket.util.convert.ConversionException: Cannot parse '03/2006'
using format [EMAIL PROTECTED]
         at
wicket.util.convert.converters.AbstractConverter.newConversionException (AbstractConverter.java:72)
         ...

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to