0

[Bug] ZK Calendar getting exception

asked 2015-03-13 16:38:47 +0800

sarco gravatar image sarco flag of Spain
93 6
https://github.com/sarcow...

updated 2018-03-13 19:15:44 +0800

Hi everyone,

I'm getting an exception when I have two or more thin events (duration lower 30 minutes).

The View must be "Day" or "Week" and the events must have the begin date from 23:40

I have been able to reproduce on the ZK Calendar demo web: http://zcal.zkoss.org/

Some screenshots: image description

First Event: image description

Second Event: image description

Any ideas how I could fix it? Although, It seems a ZK issue.

Thank you!

delete flag offensive retag edit

3 Answers

Sort by ยป oldest newest most voted
1

answered 2018-03-14 15:56:42 +0800

hawk gravatar image hawk
2225 1 5
http://hawkphoenix.blogsp... ZK Team

updated 2018-04-11 15:09:36 +0800

Thanks for your report. I have created a tracker for this bug: ZKCAL-70

You can apply the js workaround attached in the tracker.

link publish delete flag offensive edit
0

answered 2018-03-13 19:14:30 +0800

sarco gravatar image sarco flag of Spain
93 6
https://github.com/sarcow...

Push up again!

link publish delete flag offensive edit
0

answered 2018-03-14 17:13:45 +0800

sarco gravatar image sarco flag of Spain
93 6
https://github.com/sarcow...

updated 2018-03-14 17:15:45 +0800

I am not able to recreate it anymore, thanks @hawk!

Let me attach the JS code:

 /**
 * for ZKCAL-70
 * based on 2.1.5
 */
zk.afterLoad('calendar', function() {
    var oldWidget = {};
    zk.override(calendar.CalendarsDefault.prototype, oldWidget, {
        getTimeIndex: function (date) {
            var timeslots = this._timeslots,
                timeslotTime = 60/timeslots,
                index = ((date.getHours() - this._bt) * timeslots) +
                            Math.floor(date.getMinutes()/timeslotTime);
            return index;
        },
    });

});
link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2015-03-13 16:38:47 +0800

Seen: 24 times

Last updated: Apr 11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More