You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Reinout van Schouwen (JIRA)" <ji...@apache.org> on 2009/08/17 16:17:14 UTC
[jira] Created: (WICKET-2427) substituteDate function doesn't
respect date pattern
substituteDate function doesn't respect date pattern
----------------------------------------------------
Key: WICKET-2427
URL: https://issues.apache.org/jira/browse/WICKET-2427
Project: Wicket
Issue Type: Bug
Components: wicket-datetime
Affects Versions: 1.3.7
Reporter: Reinout van Schouwen
The function Wicket.DateTime.substituteDate in wicket-date.js fails to correctly format dates.
Example: create a datetextfield like this
DateTextField birthDate = DateTextField.forDateStyle("birthdateFromAndTo", "M-");
and add a DatePicker to it:
birthDate.add(new DatePicker());
The datetextfield will only validate when the input matches 'd-MMM-yyyy' (for my locale, at least) as can be verified by executing birthDate.getTextFormat(). This translates to '17-augustus-2009' for today's date.
However, when a date is selected in the datepicker, it puts '17-8-2009' in the DateTextField. The reason is, I believe, that subsituteDate() assumes that all fields in the pattern are numbers. Instead, it should execute a proper date formatting. The function either should call the Wicket side to format the input date, or it should do it in javascript. On http://www.timdown.co.uk/code/simpledateformat.js I found an Apache licensed piece of javascript code that should do the work (it misses l10n though).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-2427) substituteDate function doesn't
respect date pattern
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837545#action_12837545 ]
Igor Vaynberg commented on WICKET-2427:
---------------------------------------
we cannot apply the patch as is because it uses a non-ASL2 compatible javascript library
> substituteDate function doesn't respect date pattern
> ----------------------------------------------------
>
> Key: WICKET-2427
> URL: https://issues.apache.org/jira/browse/WICKET-2427
> Project: Wicket
> Issue Type: Bug
> Components: wicket-datetime
> Affects Versions: 1.3.7
> Reporter: Reinout van Schouwen
> Attachments: wicket-2427-wicket-datetime.patch
>
>
> The function Wicket.DateTime.substituteDate in wicket-date.js fails to correctly format dates.
> Example: create a datetextfield like this
> DateTextField birthDate = DateTextField.forDateStyle("birthdateFromAndTo", "M-");
> and add a DatePicker to it:
> birthDate.add(new DatePicker());
> The datetextfield will only validate when the input matches 'd-MMM-yyyy' (for my locale, at least) as can be verified by executing birthDate.getTextFormat(). This translates to '17-augustus-2009' for today's date.
> However, when a date is selected in the datepicker, it puts '17-8-2009' in the DateTextField. The reason is, I believe, that subsituteDate() assumes that all fields in the pattern are numbers. Instead, it should execute a proper date formatting. The function either should call the Wicket side to format the input date, or it should do it in javascript. On http://www.timdown.co.uk/code/simpledateformat.js I found an Apache licensed piece of javascript code that should do the work (it misses l10n though).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-2427) substituteDate function doesn't
respect date pattern
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837546#action_12837546 ]
Igor Vaynberg commented on WICKET-2427:
---------------------------------------
we cannot apply the patch as is because it uses a non-ASL2 compatible javascript library
> substituteDate function doesn't respect date pattern
> ----------------------------------------------------
>
> Key: WICKET-2427
> URL: https://issues.apache.org/jira/browse/WICKET-2427
> Project: Wicket
> Issue Type: Bug
> Components: wicket-datetime
> Affects Versions: 1.3.7
> Reporter: Reinout van Schouwen
> Attachments: wicket-2427-wicket-datetime.patch
>
>
> The function Wicket.DateTime.substituteDate in wicket-date.js fails to correctly format dates.
> Example: create a datetextfield like this
> DateTextField birthDate = DateTextField.forDateStyle("birthdateFromAndTo", "M-");
> and add a DatePicker to it:
> birthDate.add(new DatePicker());
> The datetextfield will only validate when the input matches 'd-MMM-yyyy' (for my locale, at least) as can be verified by executing birthDate.getTextFormat(). This translates to '17-augustus-2009' for today's date.
> However, when a date is selected in the datepicker, it puts '17-8-2009' in the DateTextField. The reason is, I believe, that subsituteDate() assumes that all fields in the pattern are numbers. Instead, it should execute a proper date formatting. The function either should call the Wicket side to format the input date, or it should do it in javascript. On http://www.timdown.co.uk/code/simpledateformat.js I found an Apache licensed piece of javascript code that should do the work (it misses l10n though).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-2427) substituteDate function doesn't
respect date pattern
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg resolved WICKET-2427.
-----------------------------------
Assignee: Igor Vaynberg
Resolution: Fixed
should be fixed because a duplicate is marked fixed...
> substituteDate function doesn't respect date pattern
> ----------------------------------------------------
>
> Key: WICKET-2427
> URL: https://issues.apache.org/jira/browse/WICKET-2427
> Project: Wicket
> Issue Type: Bug
> Components: wicket-datetime
> Affects Versions: 1.3.7
> Reporter: Reinout van Schouwen
> Assignee: Igor Vaynberg
> Attachments: wicket-2427-wicket-datetime.patch
>
>
> The function Wicket.DateTime.substituteDate in wicket-date.js fails to correctly format dates.
> Example: create a datetextfield like this
> DateTextField birthDate = DateTextField.forDateStyle("birthdateFromAndTo", "M-");
> and add a DatePicker to it:
> birthDate.add(new DatePicker());
> The datetextfield will only validate when the input matches 'd-MMM-yyyy' (for my locale, at least) as can be verified by executing birthDate.getTextFormat(). This translates to '17-augustus-2009' for today's date.
> However, when a date is selected in the datepicker, it puts '17-8-2009' in the DateTextField. The reason is, I believe, that subsituteDate() assumes that all fields in the pattern are numbers. Instead, it should execute a proper date formatting. The function either should call the Wicket side to format the input date, or it should do it in javascript. On http://www.timdown.co.uk/code/simpledateformat.js I found an Apache licensed piece of javascript code that should do the work (it misses l10n though).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2427) substituteDate function doesn't
respect date pattern
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-2427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg updated WICKET-2427:
----------------------------------
Attachment: wicket-2427-wicket-datetime.patch
attaching a patch erroneously attached to WICKET-2648
> substituteDate function doesn't respect date pattern
> ----------------------------------------------------
>
> Key: WICKET-2427
> URL: https://issues.apache.org/jira/browse/WICKET-2427
> Project: Wicket
> Issue Type: Bug
> Components: wicket-datetime
> Affects Versions: 1.3.7
> Reporter: Reinout van Schouwen
> Attachments: wicket-2427-wicket-datetime.patch
>
>
> The function Wicket.DateTime.substituteDate in wicket-date.js fails to correctly format dates.
> Example: create a datetextfield like this
> DateTextField birthDate = DateTextField.forDateStyle("birthdateFromAndTo", "M-");
> and add a DatePicker to it:
> birthDate.add(new DatePicker());
> The datetextfield will only validate when the input matches 'd-MMM-yyyy' (for my locale, at least) as can be verified by executing birthDate.getTextFormat(). This translates to '17-augustus-2009' for today's date.
> However, when a date is selected in the datepicker, it puts '17-8-2009' in the DateTextField. The reason is, I believe, that subsituteDate() assumes that all fields in the pattern are numbers. Instead, it should execute a proper date formatting. The function either should call the Wicket side to format the input date, or it should do it in javascript. On http://www.timdown.co.uk/code/simpledateformat.js I found an Apache licensed piece of javascript code that should do the work (it misses l10n though).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.