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

adding 2 short duration events causes a JavaScript error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 3.0.0
    • 2.1.5
    • Security Level: Jimmy
    • None

      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

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

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

              Created:
              Updated:
              Resolved: