You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Anil K Patel (Jira)" <ji...@apache.org> on 2026/07/03 14:22:00 UTC

[jira] [Commented] (OFBIZ-4319) Display dateTime field with input method time-dropdown not use context value to display hour and minutes

    [ https://issues.apache.org/jira/browse/OFBIZ-4319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18093457#comment-18093457 ] 

Anil K Patel commented on OFBIZ-4319:
-------------------------------------

Checked this on current trunk using Nicolas's own test, and it looks fixed now. On the example FormWidgetExamples form:

- field4 (24-hour time-dropdown), passing 2001-01-01 02:21 - the dropdowns show hour 02 and minutes 21, i.e. the value from context, not the current time.

I also checked the other two variants on the same form: field5 (12-hour clock) with 2001-01-01 14:35 shows 02, 35 and PM, and field12 (24-hour with step=5) with 09:05 shows 09 and 05. All three take the hour and minutes from the passed value rather than from nowTimestamp.

I have attached a screenshot (ofbiz-4319-timedropdown-fixed.png) showing all three fields with the passed values, next to the default-value fields (Field9/Field10) which correctly show the current time (19:11) for contrast.

So the behavior Nicolas reported, and the follow-up concern raised in 2012, both appear resolved. Unless someone still sees it, I think this can be closed as fixed.


> Display dateTime field with input method time-dropdown not use context value to display hour and minutes
> --------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-4319
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4319
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Trunk, Upcoming Branch
>            Reporter: Nicolas Malin
>            Priority: Minor
>         Attachments: DateTime-time-dropdown-with-path.png, DateTime-time-dropdown-without-path.png, OFBIZ-4319.patch, OFBIZ-4319.patch, ofbiz-4319-timedropdown-fixed.png
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> If you define a dateTime field that like :
>  <field name="estimatedStartDate"><date-time input-method="time-dropdown" step="10"/></field>
> and pass in context : estimatedStartDate = "2011-06-016 20:30:00"
> when you edit the form, estimatedStartDate take the good value 2011-06-016 on date, but take nowTimestamps.hour for dropdown hour instead of 20 and nowTimestamps.minutes for dropdown minutes instead of 30
> To test the patch :
>  * Apply patch (of course ;) )
>  * build with ant
>  * go to ofbiz example component with given date that like : "https://localhost:8443/example/control/FormWidgetExamples?field4=2001-01-01 02:21:000"
>  * the field 4 must have hour to 02 and minutes to 21
> I create 2 screenshots : before and after correction.
> Nicolas



--
This message was sent by Atlassian Jira
(v8.20.10#820010)