Hey, good point, thanks a lot ! I was using the inner workings of DateTextField to get the formatted string with locale
DateFormat.getDateInstance(DateFormat.SHORT, Locale.getDefault()).format(date) but setting the locale on request is much better, thanks again ! Zbynek On Tue, Apr 26, 2016 at 6:01 PM, Martin Grigorov <martin.grigo...@gmail.com> wrote: > Hi, > > WicketTester simulates browser behavior, so it sends String that is > converted to a Date by the Wicket component. > You can use tester.getRequest().setLocale(aLocale) to simulate localized > browser. > On Apr 26, 2016 4:22 PM, "Zbynek Vavros" <zbynekvav...@gmail.com> wrote: > > Hi, > > whats the proper way to work with WicketTester and DateTimeFields ? > I am using > > FormTester.setValue("myDateTimeField". "formattedDateTime"); > > is there any way using proper date instead of string (that differs with > locales) ? > using DateTimeField.setModelObject() or DateTimeField.setDefaultModejObject > breaks our validator that works with getConvertedInput... > > Thanks, > Zbynek >