Thanks.

I was working with the DateTimeField from wicket-datetime sub project

With this , i have made the datePicker to display date with the correct
format.


txtDateReceived = new DateTimeField("dateReceived") {

            @Override
            protected DatePicker newDatePicker() {
                DatePicker datePicker = new DatePicker(){

                    @Override
                    protected String getDatePattern() {
                        return "dd/MM/yyyy";
                    }

                };

                return datePicker;
            }


        };
Now am working on making it convert data into the correct format from the
given model. I will need to go through the API javadocs.

Thanks for your help.

Josh.

On Sun, Feb 27, 2011 at 12:04 PM, Martin Grigorov <[email protected]>wrote:

> If you pass 'null' as model I think it will look for the parent's model
> (the
> compound one).
>
> On Sun, Feb 27, 2011 at 10:55 AM, Josh Kamau <[email protected]>
> wrote:
>
> > The problem is , am using it with a compound property model and there is
> > not
> > constructor that takes only the String , and the converter.
> >
> > Can i mix PropertyModel and CompoundPropertyModel on the same form?
> >
> > Thanks for your help.
> >
> > Josh.
> >
> > On Sun, Feb 27, 2011 at 11:45 AM, Martin Grigorov <[email protected]
> > >wrote:
> >
> > > See
> > >
> >
> org.apache.wicket.datetime.markup.html.form.DateTextField.DateTextField(String,
> > > IModel<Date>, DateConverter)
> > > The 3rd argument is what you need to tweak.
> > >
> > > On Sun, Feb 27, 2011 at 10:17 AM, Josh Kamau <[email protected]>
> > > wrote:
> > >
> > > > Hi there,
> > > >
> > > > How do i change the DateTimeFormat of the
> > > > org.apache.wicket.extensions.yui.calendar.DateTimeField component? .
> > > > Currently it displays the date in mm/dd/yyyy format. i would like to
> > make
> > > > it
> > > > display as dd/mm/yyyy format.
> > > >
> > > > Josh.
> > > >
> > >
> >
>

Reply via email to