Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3342

Datebox today link date-format

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.0.3
    • Fix Version/s: 8.0.4
    • Component/s: Components
    • Security Level: Jimmy
    • Labels:
    • gh.sprint.customfield.default.name:
      ZK 8.0.4 S1

      Description

      Steps to Reproduce

      <datebox showTodayLink="true" format="dd/MM/yyyy HH:mm"/>
      

      open the datebox dropdown

      Actual Result

      the date of the today link is formatted including the ":" at the end

      Expected Result

      only display the date

      Root Cause

      these 2 methods attempt to perform the splitting between date and time format
      https://github.com/zkoss/zk/blob/master/zul/src/archive/web/js/zul/db/Datebox.js#L300
      https://github.com/zkoss/zk/blob/master/zul/src/archive/web/js/zul/db/Datebox.js#L332

      I don't think all possible date format strings can be split in a reliable way.
      It should be possible to define a date and time format separately if the default mechanism fails.

      Workaround

      Override the getDateFormat and getTimeFormat JS functions to return the expected value
      The attachment datebox-today-label.zul shows 2 alternatives

      1. splitting by space (where applicable)
      2. define a custom dateFormat using a widget attribute

        Attachments

          Activity

            People

            • Assignee:
              DevChu DevChu
              Reporter:
              cor3000 cor3000
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h