Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-5883

jQuery datetimepicker popup time value is not set correctly from an existing value

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Release Branch 12.04, Release Branch 13.07, Trunk
    • Fix Version/s: 14.12.01, 12.04.06, 13.07.02
    • Component/s: None
    • Labels:
      None

      Description

      The jQuery datetimepicker popup for date-time fields does not set the time correctly from an existing value. This is because all date-time (Timestamp) fields return a millisecond component which is not supported by datetimepicker. It seems that datetimepicker is unable to parse the time with a millisecond component and instead defaults to 00:00

      1. 1641119.patch
        0.8 kB
        Gareth Carter

        Issue Links

          Activity

          Hide
          gareth.carter Gareth Carter added a comment -

          This patch resets the input field with id $

          {id}

          with the value without ms

          Show
          gareth.carter Gareth Carter added a comment - This patch resets the input field with id $ {id} with the value without ms
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Thanks Gareth,

          Oops indeed, I was focused on the input field and did not see the time sliders in the datetimepicker. Bright side: it's good to have a distinct Jira issue for the releases change logs

          Your patch is in
          trunk r1641131
          R13.07 r1641132
          R12.04 r1641133

          Show
          jacques.le.roux Jacques Le Roux added a comment - Thanks Gareth, Oops indeed, I was focused on the input field and did not see the time sliders in the datetimepicker. Bright side: it's good to have a distinct Jira issue for the releases change logs Your patch is in trunk r1641131 R13.07 r1641132 R12.04 r1641133
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Actually when I 1st saw your change Gareth, I thought that the line which assigns the value to the calendar should be out of the block which changes the value. Then I did not think about the slilders and removed it. It's not quite clear to me why Date.CultureInfo.formatPatterns.longTime from date.js returns ms (always .000 it seems). I don't know if this would not happen, but anyway I eventually prefer to assign the value to the calendar out of the block which changes the value.

          So I committed a last change in
          trunk r1641165
          R13.07 r1641168
          R12.04 r1641169

          Show
          jacques.le.roux Jacques Le Roux added a comment - Actually when I 1st saw your change Gareth, I thought that the line which assigns the value to the calendar should be out of the block which changes the value. Then I did not think about the slilders and removed it. It's not quite clear to me why Date.CultureInfo.formatPatterns.longTime from date.js returns ms (always .000 it seems). I don't know if this would not happen, but anyway I eventually prefer to assign the value to the calendar out of the block which changes the value. So I committed a last change in trunk r1641165 R13.07 r1641168 R12.04 r1641169
          Hide
          gareth.carter Gareth Carter added a comment -

          UK Date.CultureInfo.formatPatterns.longTime is HH:mm:ss, I believe both datejs and jquery datetimepicker don't support the ms part and both fail to parse the value properly if it does exist. The actual ms value is coming from ofbiz not datejs or jquery.

          The only reason I put it in the if block is because it identifies a change in the value.

          Show
          gareth.carter Gareth Carter added a comment - UK Date.CultureInfo.formatPatterns.longTime is HH:mm:ss, I believe both datejs and jquery datetimepicker don't support the ms part and both fail to parse the value properly if it does exist. The actual ms value is coming from ofbiz not datejs or jquery. The only reason I put it in the if block is because it identifies a change in the value.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Thanks for comment Gareth, so it's OK like that, good.

          Show
          jacques.le.roux Jacques Le Roux added a comment - Thanks for comment Gareth, so it's OK like that, good.

            People

            • Assignee:
              jacques.le.roux Jacques Le Roux
              Reporter:
              gareth.carter Gareth Carter
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development