For a Friday the 13th celebration, I am showing some code that combines a small bit of PHP-based code and the Kendo UI (http://www.telerik.com). This code tests if the date is a Friday, and if it is is a Friday, is it a Friday the 13th. Based on a Boolean field, $isFri13, the Kendo UI displays differently - if today's date is a Friday the 13th, you will see "It's Jason's Day" blocked for the entire day. Double-clicking on the event will open the event's details, with the delete and save buttons removed (display: none). On other days, you will see "It's NOT Jason's Day" and you will be able to delete or edit the event.
A working example is shown here:
Try it
Here's the code:
|