[jira] Commented: (WICKET-751) DatePicker doesn't adhere to the provided DatePattern

2007-07-13 Thread Eelco Hillenius (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512658
 ] 

Eelco Hillenius commented on WICKET-751:


I would like to have the situation where we wouldn't be responsible for 
maintaining *any* localized strings.

> DatePicker doesn't  adhere to the provided DatePattern
> --
>
> Key: WICKET-751
> URL: https://issues.apache.org/jira/browse/WICKET-751
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-datetime
>Affects Versions: 1.3.0-beta2
>Reporter: Gerolf Seitz
> Fix For: 1.3.0-beta3
>
> Attachments: datePattern.patch
>
>
> when a pattern like dd.MM.yy is used, the date is actually converted as if 
> the pattern was d.M.
> this is due to the code in line 50 in DatePicker.js
> var val = '${datePattern}'.replace(/d+/, dt).replace(/M+/, 
> month).replace(/y+/, yr); 
> the code should be changed, so that at least patterns like /dd+/, /MM+/ and 
> /yy/ are supported.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (WICKET-751) DatePicker doesn't adhere to the provided DatePattern

2007-07-13 Thread Gerolf Seitz (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512655
 ] 

Gerolf Seitz commented on WICKET-751:
-

do you really need to access the localized strings in java?
since localization for the yui calendar has to be "manually" done (-> strings 
for names of days/months, ...) these are readily available on the javascript 
side (if the locale is supported by either wicket-datetime or maybe the user 
somehow), couldn't all localization stuff be done on the client? i'm a bit 
confused (no wonder at 2.00 am here in austria)

can't we just use DatePickerSettings from wicket-contrib-datepicker? that would 
make it much easier.

> DatePicker doesn't  adhere to the provided DatePattern
> --
>
> Key: WICKET-751
> URL: https://issues.apache.org/jira/browse/WICKET-751
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-datetime
>Affects Versions: 1.3.0-beta2
>Reporter: Gerolf Seitz
> Fix For: 1.3.0-beta3
>
> Attachments: datePattern.patch
>
>
> when a pattern like dd.MM.yy is used, the date is actually converted as if 
> the pattern was d.M.
> this is due to the code in line 50 in DatePicker.js
> var val = '${datePattern}'.replace(/d+/, dt).replace(/M+/, 
> month).replace(/y+/, yr); 
> the code should be changed, so that at least patterns like /dd+/, /MM+/ and 
> /yy/ are supported.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (WICKET-751) DatePicker doesn't adhere to the provided DatePattern

2007-07-13 Thread Eelco Hillenius (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512646
 ] 

Eelco Hillenius commented on WICKET-751:


Btw, OT but I *could* use some help with WICKET-747. It's a bit sucky to test 
as I'm not sure how other people are configuring this widget's positioning.

> DatePicker doesn't  adhere to the provided DatePattern
> --
>
> Key: WICKET-751
> URL: https://issues.apache.org/jira/browse/WICKET-751
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-datetime
>Affects Versions: 1.3.0-beta2
>Reporter: Gerolf Seitz
> Fix For: 1.3.0-beta3
>
> Attachments: datePattern.patch
>
>
> when a pattern like dd.MM.yy is used, the date is actually converted as if 
> the pattern was d.M.
> this is due to the code in line 50 in DatePicker.js
> var val = '${datePattern}'.replace(/d+/, dt).replace(/M+/, 
> month).replace(/y+/, yr); 
> the code should be changed, so that at least patterns like /dd+/, /MM+/ and 
> /yy/ are supported.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (WICKET-751) DatePicker doesn't adhere to the provided DatePattern

2007-07-13 Thread Eelco Hillenius (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512645
 ] 

Eelco Hillenius commented on WICKET-751:


> but what if the date is shown in a label instead of a textbox (don't know if 
> that is possible right now)?

That's a good point. You feel like playing with it a bit? Output should work 
fine, it's the interpreting that is tricky to maintain, as those localized 
strings are hardly accessible in Java.

> concering localization: the YUI datepicker itself can (somehow) easily be 
> localized. you just have to set some properties. this has to be done per YUI 
> datepicker instance. an example for a german and japanese localization can be 
> found at the YUI calendar website. 

Yeah. Localization should be doable, and I think/ hope I set it up so that it 
can relatively easily be done. The problem is that we need people to support 
the languages, and as you can learn from e.g. jscalendar, this is hard to 
achieve, so you'll probably end up supporting just a couple of languages well, 
a couple half-baked and no support for most. Doesn't have to be *that* much of 
a problem though. You're welcome to start with this and supply a patch that 
works for German.

> anyway, if you don't feel the need for it, i'll not take anymore of your 
> precious time. i'm just glad the zeropadding is fixed (i only found the bug 
> because of some german locale testing). thx for that.

Hey no problem. Anything that makes this component close to perfect is welcome 
:) Thanks for helping.

> DatePicker doesn't  adhere to the provided DatePattern
> --
>
> Key: WICKET-751
> URL: https://issues.apache.org/jira/browse/WICKET-751
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-datetime
>Affects Versions: 1.3.0-beta2
>Reporter: Gerolf Seitz
> Fix For: 1.3.0-beta3
>
> Attachments: datePattern.patch
>
>
> when a pattern like dd.MM.yy is used, the date is actually converted as if 
> the pattern was d.M.
> this is due to the code in line 50 in DatePicker.js
> var val = '${datePattern}'.replace(/d+/, dt).replace(/M+/, 
> month).replace(/y+/, yr); 
> the code should be changed, so that at least patterns like /dd+/, /MM+/ and 
> /yy/ are supported.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (WICKET-751) DatePicker doesn't adhere to the provided DatePattern

2007-07-13 Thread Gerolf Seitz (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512644
 ] 

Gerolf Seitz commented on WICKET-751:
-

yeah, you're probably right. 
but what if the date is shown in a label instead of a textbox (don't know if 
that is possible right now)?

concering localization: the YUI datepicker itself can (somehow) easily be 
localized. you just have to set some properties. this has to be done per YUI 
datepicker instance. an example for a german and japanese localization can be 
found at the YUI calendar website.

anyway, if you don't feel the need for it, i'll not take anymore of your 
precious time. i'm just glad the zeropadding is fixed (i only found the bug 
because of some german locale testing). thx for that.

> DatePicker doesn't  adhere to the provided DatePattern
> --
>
> Key: WICKET-751
> URL: https://issues.apache.org/jira/browse/WICKET-751
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-datetime
>Affects Versions: 1.3.0-beta2
>Reporter: Gerolf Seitz
> Fix For: 1.3.0-beta3
>
> Attachments: datePattern.patch
>
>
> when a pattern like dd.MM.yy is used, the date is actually converted as if 
> the pattern was d.M.
> this is due to the code in line 50 in DatePicker.js
> var val = '${datePattern}'.replace(/d+/, dt).replace(/M+/, 
> month).replace(/y+/, yr); 
> the code should be changed, so that at least patterns like /dd+/, /MM+/ and 
> /yy/ are supported.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (WICKET-751) DatePicker doesn't adhere to the provided DatePattern

2007-07-13 Thread Eelco Hillenius (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512642
 ] 

Eelco Hillenius commented on WICKET-751:


> i was actually thinking about "names of days and stuff".

Stuff rocks. Names of days I don't know ;)

Seriously, it's not so much that I think it is impossible to do, but rather 
that I think it's hard to support all the languages there are. The way the date 
picker is set up currently, it should support the pattern of any locale out 
there. Unless resources for all the different days/ months/ etc are readily 
available someone (and with the right license), I think it's too much of a 
hassle.

And then there is the question of whether it is useful in the first place. I 
think people will typically use the picker, but it's great that they can 
alternatively just type it as well. Tbh, I don't think anyone would prefer to 
type names of days and months to just using the numbers.

> DatePicker doesn't  adhere to the provided DatePattern
> --
>
> Key: WICKET-751
> URL: https://issues.apache.org/jira/browse/WICKET-751
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-datetime
>Affects Versions: 1.3.0-beta2
>Reporter: Gerolf Seitz
> Fix For: 1.3.0-beta3
>
> Attachments: datePattern.patch
>
>
> when a pattern like dd.MM.yy is used, the date is actually converted as if 
> the pattern was d.M.
> this is due to the code in line 50 in DatePicker.js
> var val = '${datePattern}'.replace(/d+/, dt).replace(/M+/, 
> month).replace(/y+/, yr); 
> the code should be changed, so that at least patterns like /dd+/, /MM+/ and 
> /yy/ are supported.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (WICKET-751) DatePicker doesn't adhere to the provided DatePattern

2007-07-13 Thread Gerolf Seitz (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512640
 ] 

Gerolf Seitz commented on WICKET-751:
-

i was actually thinking about "names of days and stuff". i already got it 
working with names of months. there aren't that many other date related fields, 
so maybe it wouldn't be that hard. and since the YUI datepicker only needs day 
(of month), month and year, all other date pattern elements would only have to 
be ignored in the string-to-date direction and be converted to the values (eg 
name of weekday) in the date-to-string direction.
but it probably comes down to whether users would even need it.

anyway, since the datepicker basically only works with a short date pattern 
(well, any variations of (d+, M+, yy+), maybe this should be mentioned in the 
javadocs of the datepicker somewhere.


> DatePicker doesn't  adhere to the provided DatePattern
> --
>
> Key: WICKET-751
> URL: https://issues.apache.org/jira/browse/WICKET-751
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-datetime
>Affects Versions: 1.3.0-beta2
>Reporter: Gerolf Seitz
> Fix For: 1.3.0-beta3
>
> Attachments: datePattern.patch
>
>
> when a pattern like dd.MM.yy is used, the date is actually converted as if 
> the pattern was d.M.
> this is due to the code in line 50 in DatePicker.js
> var val = '${datePattern}'.replace(/d+/, dt).replace(/M+/, 
> month).replace(/y+/, yr); 
> the code should be changed, so that at least patterns like /dd+/, /MM+/ and 
> /yy/ are supported.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (WICKET-751) DatePicker doesn't adhere to the provided DatePattern

2007-07-13 Thread Eelco Hillenius (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512599
 ] 

Eelco Hillenius commented on WICKET-751:


I'm almost done fixing this, I'll commit it in a sec.

More patterns? Like names of days and stuff? That'd be very hard to maintain in 
a decent fashion, and I doubt it's something users have been waiting for. Or do 
you mean something else maybe?


> DatePicker doesn't  adhere to the provided DatePattern
> --
>
> Key: WICKET-751
> URL: https://issues.apache.org/jira/browse/WICKET-751
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-datetime
>Affects Versions: 1.3.0-beta2
>Reporter: Gerolf Seitz
> Attachments: datePattern.patch
>
>
> when a pattern like dd.MM.yy is used, the date is actually converted as if 
> the pattern was d.M.
> this is due to the code in line 50 in DatePicker.js
> var val = '${datePattern}'.replace(/d+/, dt).replace(/M+/, 
> month).replace(/y+/, yr); 
> the code should be changed, so that at least patterns like /dd+/, /MM+/ and 
> /yy/ are supported.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (WICKET-751) DatePicker doesn't adhere to the provided DatePattern

2007-07-13 Thread Gerolf Seitz (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512597
 ] 

Gerolf Seitz commented on WICKET-751:
-

hm, crap.
but it doesn't matter that much, since i wanted to provide a patch that covers 
even more date patterns.
sorry for wasting your time though. i will triple check it next time.

> DatePicker doesn't  adhere to the provided DatePattern
> --
>
> Key: WICKET-751
> URL: https://issues.apache.org/jira/browse/WICKET-751
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-datetime
>Affects Versions: 1.3.0-beta2
>Reporter: Gerolf Seitz
> Attachments: datePattern.patch
>
>
> when a pattern like dd.MM.yy is used, the date is actually converted as if 
> the pattern was d.M.
> this is due to the code in line 50 in DatePicker.js
> var val = '${datePattern}'.replace(/d+/, dt).replace(/M+/, 
> month).replace(/y+/, yr); 
> the code should be changed, so that at least patterns like /dd+/, /MM+/ and 
> /yy/ are supported.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (WICKET-751) DatePicker doesn't adhere to the provided DatePattern

2007-07-13 Thread Eelco Hillenius (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512584
 ] 

Eelco Hillenius commented on WICKET-751:


Cheers. Unfortunately, the patch doesn't work.

> DatePicker doesn't  adhere to the provided DatePattern
> --
>
> Key: WICKET-751
> URL: https://issues.apache.org/jira/browse/WICKET-751
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket-datetime
>Affects Versions: 1.3.0-beta2
>Reporter: Gerolf Seitz
> Attachments: datePattern.patch
>
>
> when a pattern like dd.MM.yy is used, the date is actually converted as if 
> the pattern was d.M.
> this is due to the code in line 50 in DatePicker.js
> var val = '${datePattern}'.replace(/d+/, dt).replace(/M+/, 
> month).replace(/y+/, yr); 
> the code should be changed, so that at least patterns like /dd+/, /MM+/ and 
> /yy/ are supported.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.