Disable Future Dates and Past Dates

Issue #47 new
Bimal Barik created an issue

How can I change the color of cells before August 15, 2015 and disable click on it? Also please let me know how can I disable future dates?

Comments (2)

  1. Lukasz Kokoszkiewicz repo owner

    About disabling future dates please refer to the documentation (http://w3widgets.com/responsive-calendar/#description). Any future dates can be disabled using pre-defined classes:

    Classes in use:

    • mon, tue, wed, thu, fri, sat, sun - for each day of the week
    • past, today, future - for indicating if day is in the past, future or neither
    • non-current - indicating the day is not from current month
    • active - default class for day that have some events

    As for disabling the dates before Aug 15, 2015 on each click you will have to check if the clicked date is less then 15.08.2015. Here is the documentation section the shows how to extract the clicked date from the event: http://w3widgets.com/responsive-calendar/#callbacks

  2. Log in to comment