You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by hfriederichs <h....@ohra.nl> on 2016/03/01 09:52:58 UTC

Dateparsing error kendo AjaxDateTimePicker only in March, May, October

Good morning/afternoon/evening

I'm using a com.googlecode.wicket.kendo.ui.form.datetime.AjaxDateTimePicker
version 7.1.0 on top of Wicket 7.1.0

Since today, march 1st, I get this error when I pick a month:

Error while parsing datetime: date was '01 Mar 2016' and time was '17:30'.

And this is very, very strange: I'm getting this error only when choosing
March, May and October, and not in the other months...

Regards, Hans



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Dateparsing-error-kendo-AjaxDateTimePicker-only-in-March-May-October-tp4673756.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

Posted by Sebastien <se...@gmail.com>.
I've added a todo to automatically register current culture and messages
https://github.com/sebfz1/wicket-jquery-ui/issues/222

I still should debate if it's a good idea or not... :/

Re: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

Posted by hfriederichs <h....@ohra.nl>.
I'm not allowed to re-open the issue, so I added a comment to the closed
issue.


Thank you so far

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Dateparsing-error-kendo-AjaxDateTimePicker-only-in-March-May-October-tp4673756p4673787.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

Posted by Sebastien <se...@gmail.com>.
Ok, please reopen the issue bellow with a description (is it only for
Dutch, is it repro with default/US locale for instance?)
https://github.com/sebfz1/wicket-jquery-ui/issues/216

No need a quickstart for this case. I will try to look at this before the
WE...

Thanks in advance,
Sebastien.

Re: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

Posted by hfriederichs <h....@ohra.nl>.
EEE is the abbreviated day, EEEE the full day-name.
But EEE doesn't work either.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Dateparsing-error-kendo-AjaxDateTimePicker-only-in-March-May-October-tp4673756p4673782.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

Posted by Sebastien <se...@gmail.com>.
The EEE issue has been fixed some month ago (i had forgot)
http://apache-wicket.1842946.n4.nabble.com/Bug-in-wicket-jqueryui-Kendo-DateTimePicker-td4673069.html

But isn't it supposed to be 3 'E', not 4 ?
http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html

Re: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

Posted by Sebastien <se...@gmail.com>.
IIRC, EEEE is not supported by kendi UI, try finding a previous post about
this... (maybe in the wicket-jquery-ui forum)

On Tue, Mar 1, 2016 at 3:11 PM, hfriederichs <h....@ohra.nl> wrote:

> That solved the problem, thank you Sebastian!
>
> By he way, when I use E in my date pattern, like in "EEEE d MMMM yyyy",
> that
> still doesn't work.
>
> When the datetimepicker is displayed first,  it renders ok:
>
> dinsdag 1 maart 2016
>
> (dinsdag=tuesday, maart=march in Dutch)
>
> But when I change the date, I get:
>
> Error while parsing datetime: date was 'EEEE 17 maart 2016' and time was
> '19.00'
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Dateparsing-error-kendo-AjaxDateTimePicker-only-in-March-May-October-tp4673756p4673779.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

Posted by hfriederichs <h....@ohra.nl>.
That solved the problem, thank you Sebastian!

By he way, when I use E in my date pattern, like in "EEEE d MMMM yyyy", that
still doesn't work.

When the datetimepicker is displayed first,  it renders ok:

dinsdag 1 maart 2016

(dinsdag=tuesday, maart=march in Dutch)

But when I change the date, I get:

Error while parsing datetime: date was 'EEEE 17 maart 2016' and time was
'19.00'





--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Dateparsing-error-kendo-AjaxDateTimePicker-only-in-March-May-October-tp4673756p4673779.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

Posted by Sebastien <se...@gmail.com>.
Additional setup options:

	@Override
	public void renderHead(IHeaderResponse response)
	{
		super.renderHead(response);

		// response.render(new KendoCultureHeaderItem("fr")); // or fr-FR
		// response.render(new KendoCultureHeaderItem(KendoCulture.FR)); //
or KendoCulture.FR_FR
		response.render(new KendoCultureHeaderItem(Locale.FRENCH));
	}



On Tue, Mar 1, 2016 at 2:30 PM, Sebastien <se...@gmail.com> wrote:

> Yes, that explains, you need to have kendo cultures:
>
>         <dependency>
>             <groupId>com.googlecode.wicket-jquery-ui</groupId>
>             <artifactId>wicket-kendo-ui-culture</artifactId>
>             <version>7.2.0</version>
>         </dependency>
>
> Usage is (was, see bellow) explained here:
>
> http://localhost:8080/wicket-jquery-ui/kendo/datetimepicker/LocaleDateTimePickerPage
>
> But there is new classes to help:
>
>  public void renderHead(IHeaderResponse response)
>  {
>      super.renderHead(response);
>
>      response.render(new KendoCultureHeaderItem(KendoCulture.FR_FR));
>  }
>
> or in Application#init() - I guess your best choice
>
>      public void init()
>      {
>          super.init();
>
>          this.getHeaderContributorListenerCollection().add(new
> KendoCultureHeaderContributor(Locale.GERMANY));
>      }
>
> Bet regards,
> Sebastien
>
>
> On Tue, Mar 1, 2016 at 12:46 PM, hfriederichs <h....@ohra.nl>
> wrote:
>
>> It's a Locale thing...
>>
>
>

Re: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

Posted by Sebastien <se...@gmail.com>.
Yes, that explains, you need to have kendo cultures:

        <dependency>
            <groupId>com.googlecode.wicket-jquery-ui</groupId>
            <artifactId>wicket-kendo-ui-culture</artifactId>
            <version>7.2.0</version>
        </dependency>

Usage is (was, see bellow) explained here:
http://localhost:8080/wicket-jquery-ui/kendo/datetimepicker/LocaleDateTimePickerPage

But there is new classes to help:

 public void renderHead(IHeaderResponse response)
 {
     super.renderHead(response);

     response.render(new KendoCultureHeaderItem(KendoCulture.FR_FR));
 }

or in Application#init() - I guess your best choice

     public void init()
     {
         super.init();

         this.getHeaderContributorListenerCollection().add(new
KendoCultureHeaderContributor(Locale.GERMANY));
     }

Bet regards,
Sebastien


On Tue, Mar 1, 2016 at 12:46 PM, hfriederichs <h....@ohra.nl> wrote:

> It's a Locale thing...
>

Re: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

Posted by hfriederichs <h....@ohra.nl>.
It's a Locale thing...

I Have:

@Override
public Locale getLocale() {
	return new Locale("nl", "NL");
}

When I change this to ("en", "US") it works fine for me too.

And I discovered another thing: the dutch short, three letter forms for
months are the same as in English, except for March, May and October ('mrt',
'mei', 'okt' versus 'Mar', 'May' and 'Oct'), which explains the odd
behaviour I mentioned in my first post.

Perhaps Dutch is not supported for this kind of GUI translations? 
I'd rather not change to the English Locale.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Dateparsing-error-kendo-AjaxDateTimePicker-only-in-March-May-October-tp4673756p4673772.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

Posted by Sebastien <se...@gmail.com>.
I can make it work with:
final DateTimePicker datetimepicker = new
AjaxDateTimePicker("datetimepicker", Model.of(calendar.getTime()), "dd MMM
yyyy", "HH:mm")



On Tue, Mar 1, 2016 at 10:43 AM, hfriederichs <h....@ohra.nl> wrote:

> It's not a DatePicker, but a AjaxDateTimePicker.
> I discovered it is indeed a pattern issue.
> This is my code:
>
> private final static String dateDisplay = "dd MMM yyyy";
> private final static String timeDisplay = "HH.mm";
> scheduleDateTimeField = new AjaxDateTimePicker("scheduledatumtijd",
> planDateModel, dateDisplay, timeDisplay) {
>
> etcetera.
>
> It works when I change dateDisplay to "dd MM yyyy", so that the month
> parses
> to a two digit number in stead of a shortened String (like 'Mar',
> 'Apr'...).
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Dateparsing-error-kendo-AjaxDateTimePicker-only-in-March-May-October-tp4673756p4673763.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

Posted by hfriederichs <h....@ohra.nl>.
It's not a DatePicker, but a AjaxDateTimePicker. 
I discovered it is indeed a pattern issue.
This is my code:

private final static String dateDisplay = "dd MMM yyyy";
private final static String timeDisplay = "HH.mm";
scheduleDateTimeField = new AjaxDateTimePicker("scheduledatumtijd",
planDateModel, dateDisplay, timeDisplay) {

etcetera.

It works when I change dateDisplay to "dd MM yyyy", so that the month parses
to a two digit number in stead of a shortened String (like 'Mar', 'Apr'...).



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Dateparsing-error-kendo-AjaxDateTimePicker-only-in-March-May-October-tp4673756p4673763.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

Posted by Martin Grigorov <mg...@apache.org>.
Can you reproduce it at
http://www.7thweb.net/wicket-jquery-ui/kendo/datetimepicker/AjaxDatePickerPage
?
It works for me

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Mar 1, 2016 at 10:09 AM, hfriederichs <h....@ohra.nl> wrote:

> I upgraded Wicket, Wicket JQuery and KendoUI to 7.2.0.
>
> Same problem.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Dateparsing-error-kendo-AjaxDateTimePicker-only-in-March-May-October-tp4673756p4673758.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

Posted by Sebastien <se...@gmail.com>.
Hi,

I make me think about a locale or pattern issue.

This does not repro in the sample site:
http://www.7thweb.net/wicket-jquery-ui/kendo/datetimepicker/PatternDateTimePickerPage

Please try to isolate the issue in a quickstart (we often find the solution
while doing the quickstart ;))

Thanks & best regards,
Sebastien.

Re: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

Posted by hfriederichs <h....@ohra.nl>.
I upgraded Wicket, Wicket JQuery and KendoUI to 7.2.0.

Same problem.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Dateparsing-error-kendo-AjaxDateTimePicker-only-in-March-May-October-tp4673756p4673758.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Please try with Wicket JQuery UI 7.2.0.
I think KendoUI has been updated with 7.2.0.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Mar 1, 2016 at 9:52 AM, hfriederichs <h....@ohra.nl> wrote:

> Good morning/afternoon/evening
>
> I'm using a com.googlecode.wicket.kendo.ui.form.datetime.AjaxDateTimePicker
> version 7.1.0 on top of Wicket 7.1.0
>
> Since today, march 1st, I get this error when I pick a month:
>
> Error while parsing datetime: date was '01 Mar 2016' and time was '17:30'.
>
> And this is very, very strange: I'm getting this error only when choosing
> March, May and October, and not in the other months...
>
> Regards, Hans
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Dateparsing-error-kendo-AjaxDateTimePicker-only-in-March-May-October-tp4673756.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>