You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Marieke Vandamme (JIRA)" <ji...@apache.org> on 2008/10/08 10:09:44 UTC
[jira] Created: (WICKET-1863) DateTimeField: small bugs
DateTimeField: small bugs
-------------------------
Key: WICKET-1863
URL: https://issues.apache.org/jira/browse/WICKET-1863
Project: Wicket
Issue Type: Bug
Components: wicket-datetime
Affects Versions: 1.4-M3
Reporter: Marieke Vandamme
Hello,
I found 2 different bugs that makes my applications react in the wrong way :
- onBeforeRender:378
When the modelobject-date is null, the hours and minutes are not set to null to. Now only date is set to null.
I use this object with ajax, and when the DateTimeField loads with a new modelobject, the hours- and minutesfield holds the old value. If not clear, I can make a quickstart.
- setDate:231
This function adjusts the modelobject with the filled in date. But the hours and minutes aren't add.
I have overridden the function so it would work correctly. My code:
public void setDate(Date date)
{
super.setDate(date);
System.out.println("setDate [" + date + "]");
MutableDateTime modelDate = new MutableDateTime(date);
Integer hours = getHours();
Integer minutes = getMinutes();
boolean use12HourFormat = use12HourFormat();
if (hours != null) {
modelDate.set(DateTimeFieldType.hourOfDay(), hours.intValue() % (use12HourFormat ? 12 : 24));
modelDate.setMinuteOfHour((minutes != null) ? minutes.intValue() : 0);
}
setDefaultModelObject(modelDate.toDate());
}
Thanks a lot ! Marieke.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-1863) DateTimeField: small bugs
Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Juergen Donnerstag resolved WICKET-1863.
----------------------------------------
Resolution: Fixed
Fix Version/s: 1.4-RC2
Assignee: Juergen Donnerstag
thanks
> DateTimeField: small bugs
> -------------------------
>
> Key: WICKET-1863
> URL: https://issues.apache.org/jira/browse/WICKET-1863
> Project: Wicket
> Issue Type: Bug
> Components: wicket-datetime
> Affects Versions: 1.4-M3
> Reporter: Marieke Vandamme
> Assignee: Juergen Donnerstag
> Fix For: 1.4-RC2
>
>
> Hello,
> I found 2 different bugs that makes my applications react in the wrong way :
> - onBeforeRender:378
> When the modelobject-date is null, the hours and minutes are not set to null to. Now only date is set to null.
> I use this object with ajax, and when the DateTimeField loads with a new modelobject, the hours- and minutesfield holds the old value. If not clear, I can make a quickstart.
> - setDate:231
> This function adjusts the modelobject with the filled in date. But the hours and minutes aren't add.
> I have overridden the function so it would work correctly. My code:
> public void setDate(Date date)
> {
> super.setDate(date);
> System.out.println("setDate [" + date + "]");
> MutableDateTime modelDate = new MutableDateTime(date);
> Integer hours = getHours();
> Integer minutes = getMinutes();
> boolean use12HourFormat = use12HourFormat();
> if (hours != null) {
> modelDate.set(DateTimeFieldType.hourOfDay(), hours.intValue() % (use12HourFormat ? 12 : 24));
> modelDate.setMinuteOfHour((minutes != null) ? minutes.intValue() : 0);
> }
> setDefaultModelObject(modelDate.toDate());
> }
> Thanks a lot ! Marieke.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.