You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jim Larsen (JIRA)" <ji...@apache.org> on 2011/03/29 08:49:05 UTC
[jira] [Created] (WICKET-3569) DateField is broken
DateField is broken
-------------------
Key: WICKET-3569
URL: https://issues.apache.org/jira/browse/WICKET-3569
Project: Wicket
Issue Type: Bug
Components: wicket-core
Affects Versions: 1.5-RC2
Reporter: Jim Larsen
org.apache.wicket.extensions.yui.calendar.DateField
When submitting form with empty date field (null date in model), the model is set to current date.
dateField.getModelObject() return currentDate
dateField.getDate() returns null.
This is a major problem ie in a CompoundPropertyModel where all null dates will be set to currentDate.
Using a DateTextField and adding a DatePicker to this, does not have same problem.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-3569) DateField is broken
Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter Ertl resolved WICKET-3569.
--------------------------------
Resolution: Fixed
Fix Version/s: 1.5-RC4
Assignee: Peter Ertl
> DateField is broken
> -------------------
>
> Key: WICKET-3569
> URL: https://issues.apache.org/jira/browse/WICKET-3569
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.5-RC2
> Reporter: Jim Larsen
> Assignee: Peter Ertl
> Fix For: 1.5-RC4
>
>
> org.apache.wicket.extensions.yui.calendar.DateField
> When submitting form with empty date field (null date in model), the model is set to current date.
> dateField.getModelObject() return currentDate
> dateField.getDate() returns null.
> This is a major problem ie in a CompoundPropertyModel where all null dates will be set to currentDate.
> Using a DateTextField and adding a DatePicker to this, does not have same problem.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3569) DateField is broken
Posted by "Andera Del Bene (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012966#comment-13012966 ]
Andera Del Bene commented on WICKET-3569:
-----------------------------------------
I think that this behavior is due to the following code lines from class DateTimeField.java
@Override
protected void convertInput()
{
try
{
// Get the converted input values
Date dateFieldInput = dateField.getConvertedInput();
Integer hoursInput = hoursField.getConvertedInput();
Integer minutesInput = minutesField.getConvertedInput();
AM_PM amOrPmInput = amOrPmChoice.getConvertedInput();
// Default with "now"
if (dateFieldInput == null)
{
dateFieldInput = new Date();
}
but I don't know why "now" was chosen as default value.
> DateField is broken
> -------------------
>
> Key: WICKET-3569
> URL: https://issues.apache.org/jira/browse/WICKET-3569
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.5-RC2
> Reporter: Jim Larsen
>
> org.apache.wicket.extensions.yui.calendar.DateField
> When submitting form with empty date field (null date in model), the model is set to current date.
> dateField.getModelObject() return currentDate
> dateField.getDate() returns null.
> This is a major problem ie in a CompoundPropertyModel where all null dates will be set to currentDate.
> Using a DateTextField and adding a DatePicker to this, does not have same problem.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira