How to disable past days in ZK Calendar?

asked 2020-04-24 15:31:46 +0800

rsheth gravatar image rsheth
103 2

updated 2020-04-24 15:32:17 +0800

Hello All,

I'm using ZK CE-9.0.0 & zk-calendar-2.1.5 source code.

Currently all the days are enabled in the calendar.

I need to disable the past days (greyed out & no click event), from all the views(Day/Week/Month), but not able to find any such feature directly available.

Can anyone help me with this please?



delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-04-29 16:54:52 +0800

MDuchemin gravatar image MDuchemin
2480 1 6
ZK Team


Calendars doesn't have a constraint feature to grey out dates based on a rule. Implementing it is theoretically possible with overrides and custom JavaScript, depending on how much effort you want to put into this, as that's essentially a new feature.

For a general idea, you would need to hook into the bind_ and the updateDateRange_ functions, and iterate over currently displayed dates, then apply a style to the cell depending on the date.

It looks like there is already a workaround described here to intercept the event. If that's not sufficient, you can consider opening a feature request.

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

1 follower



Asked: 2020-04-24 15:31:46 +0800

Seen: 6 times

Last updated: Apr 29 '20

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