Uploaded image for project: 'ZK Calendar'
  1. ZK Calendar
  2. ZKCAL-70

adding 2 short duration events causes a JavaScript error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 2.1.5
    • Fix Version/s: 3.0.0
    • Security Level: Jimmy
    • Labels:
      None

      Description

      Steps to Reproduce

      1. open chrome dev tool
      2. load the attached zul

      Current Result

      a javascript shows in Console tab:

      calendar.wpd:2346 Uncaught TypeError: Cannot read property 'indexOf' of undefined
      at init.fixPosition (calendar.wpd:2346)
      at init._rePositionDay (calendar.wpd:1601)
      at init._zkf (calendar.wpd:2374)
      at _invoke (zk.wpd:12532)
      at init.fire (zk.wpd:12515)
      at _fire (zk.wpd:12658)
      at Object.fireDown (zk.wpd:12753)
      at Object.fireDown (zk.wpd:14059)
      at Object.fireSized (zk.wpd:14570)
      at init.replaceHTML (zk.wpd:16256)

      Expected Result

      no error.

      Root cause

      getTimeIndex() returns an index out of number of total slots index (48 > 47)

      workaround

      include zkcal-70.js on a page with Calendar

        Attachments

        1. Cal70Composer.java
          1 kB
        2. image-2020-11-24-17-48-05-797.png
          image-2020-11-24-17-48-05-797.png
          3 kB
        3. zkcal-70.js
          0.8 kB
        4. zkcal70.zul
          0.2 kB

          Activity

            People

            Assignee:
            Leon03 Leon03
            Reporter:
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: