I find the problem, DatePicker is working when it is added to a TextField but
doesn't work with a label.


madx wrote:
> 
> I have a custom component say "BaseComponent" which has a label  say
> "lbl".
> I am trying to add a datepicker to the "lbl".
> 
> baseComponent.add(new Label("lbl", new PropertyModel(BaseComponent.this,
> "labelValue")));
> then..
> DatePicker dp = new DatePicker(){
>         @Override
>         protected String getDatePattern() {
>           return "MM/dd/yyyy";
>         }
>       };
>      baseComponent.get("lbl").add(dp);
>      baseComponent.get("lbl").add(new AjaxFormSubmitBehavior("onchange") {
>         protected void onSubmit(AjaxRequestTarget target) {
>            String updatedDate = baseComponent.getLabelValue();
>         }
>     }
> 
> The value updatedDate is not the date i selected from the calendar popup.
> It used to work before, when i using one of the previous wicket-datetime
> jars (not sure which one), but it is not working now. I am using 1.3.1
> now.
> What am I doing wrong here?
> Thanks
> 

-- 
View this message in context: 
http://www.nabble.com/DatePicker-with-onchange-behavior-tp15579666p15701816.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