fires before the change of date selection

boolean beforeChange(Date date,Date oldDate,boolean click){ ... };


dateDatethe newly selected date
oldDateDatethe previously selected date
clickbooleandefines whether the change happened because of a click on a date (true), or due to an API call (false)


booleantrue - to allow changing date selection, false - to prevent changing date selection

Example"BeforeChange",function(date, oldDate, click){
    if (date > new Date())
        return false;

Related samples


You can block selection of particular dates by returning false from the event handler.

See also
Back to top