Wijmo UI for the Web
beforeSelect Event
wijmo.calendar.wijcalendar Namespace > options type : beforeSelect Event
The jQuery.Event object.
The data with this event.
The beforeSelect event handler. A function called before user selects a day by mouse. Cancellable.
Syntax
$(function () {
    // Set beforeSelect event handler function
    $(".selector").wijcalendar({
        beforeSelect : function (e, args) {
     
        }
    });
});
beforeSelect = function ( 
   e : Object,
   args : ISelectedDate
) { };

Parameters

e
The jQuery.Event object.
args
The data with this event.
Example
$("#calendar1").wijcalendar({
      beforeSelect: function (e, data) 
      {
             var selDates = $("#calendar1").wijcalendar('option', 'selectedDates'),
             selected = false,
             list;
             $.each(selDates, function (i, d)
                 {
                   if (data.date.getFullYear() === d.getFullYear() &&
                       data.date.getMonth() === d.getMonth() &&                        data.date.getDate() === d.getDate())
                                  {
                           selected = true;
                           return false;
                        }
             );
 
          if (selected) 
          {
                   $("#calendar1").wijcalendar('unSelectDate', data.date);
                      } else
                                 {
                           $("#calendar1").wijcalendar('selectDate', data.date);
                      }
           list = $("#msg").empty();
                       selDates = $("#calendar1").wijcalendar('option', 'selectedDates');
                      $.each(selDates, function (i, d) 
                      {
                var li = $("<li/>");
                li.text(d.getFullYear() + "/" + (d.getMonth() + 1) + "/" + d.getDate());
               list.append(li);
            });
               return false;
            }
                   });
See Also

Reference

options type
wijcalendar jQuery Widget