function displayEvents(formattedDate, today) {
        // set heading
        var headingTmpl = $.templates("#mycalendar-heading-template");
        
        if (today) {
            var headingText = {"heading": jQuery.i18n.prop('event_heading_today')};
        } else {
            var headingText = {"heading": jQuery.i18n.prop('event_heading', moment(formattedDate).format("LL"))};
        }
        
        var headingHtml = headingTmpl.render(headingText);
        $(".mycalendar-event-heading").html(headingHtml);
        
        // show the events
        var selectedDayEvents = getEvents(formattedDate, true);
        if (selectedDayEvents.length > 0) {
            $(".mycalendar-events").text("");
            var eventsDisplay = getEventsDisplay(selectedDayEvents);
            
            var template = $.templates("#mycalendar-event-template");
            var rendered = template.render(eventsDisplay);
            $(".mycalendar-events").html(rendered);
            
        } else {
             $(".mycalendar-events").html("<tr><td>"+jQuery.i18n.prop('no_events')+"</td></tr>");
        }
        
        setMainFrameHeightNow(window.name, -1);
    }
/**
     * Get the events for the selected day, parse and display below the calendar
     * @param formattedDate YYYY-MM-DD
     * @param today true or false
     */
Get the events for the selected day, parse and display below the calendar
@param formattedDate YYYY-MM-DD
@param today true or false
Get the events for the selected day parse and display below the calendar @param formattedDate YYYY - MM - DD @param today true or false
function displayEvents(formattedDate, today) {
        var headingTmpl = $.templates("#mycalendar-heading-template");
        if (today) {
            var headingText = {"heading": jQuery.i18n.prop('event_heading_today')};
        } else {
            var headingText = {"heading": jQuery.i18n.prop('event_heading', moment(formattedDate).format("LL"))};
        }
        var headingHtml = headingTmpl.render(headingText);
        $(".mycalendar-event-heading").html(headingHtml);
        var selectedDayEvents = getEvents(formattedDate, true);
        if (selectedDayEvents.length > 0) {
            $(".mycalendar-events").text("");
            var eventsDisplay = getEventsDisplay(selectedDayEvents);
            var template = $.templates("#mycalendar-event-template");
            var rendered = template.render(eventsDisplay);
            $(".mycalendar-events").html(rendered);
        } else {
             $(".mycalendar-events").html("<tr><td>"+jQuery.i18n.prop('no_events')+"</td></tr>");
        }
        setMainFrameHeightNow(window.name, -1);
    }
function displayEvents ( formattedDate , today ) { var headingTmpl = $ . templates ( "#mycalendar-heading-template" ) ; if ( today ) { var headingText = { "heading" : jQuery . i18n . prop ( 'event_heading_today' ) } ; } else { var headingText = { "heading" : jQuery . i18n . prop ( 'event_heading' , moment ( formattedDate ) . format ( "LL" ) ) } ; } var headingHtml = headingTmpl . render ( headingText ) ; $ ( ".mycalendar-event-heading" ) . html ( headingHtml ) ; var selectedDayEvents = getEvents ( formattedDate , true ) ; if ( selectedDayEvents . length > 0 ) { $ ( ".mycalendar-events" ) . text ( "" ) ; var eventsDisplay = getEventsDisplay ( selectedDayEvents ) ; var template = $ . templates ( "#mycalendar-event-template" ) ; var rendered = template . render ( eventsDisplay ) ; $ ( ".mycalendar-events" ) . html ( rendered ) ; } else { $ ( ".mycalendar-events" ) . html ( "<tr><td>" + jQuery . i18n . prop ( 'no_events' ) + "</td></tr>" ) ; } setMainFrameHeightNow ( window . name , - 1 ) ; }
Get the events for the selected day, parse and display below the calendar
 @param formattedDate YYYY-MM-DD
 @param today true or false
Get the events for the selected day parse and display below the calendar @param formattedDate YYYY - MM - DD @param today true or false
// set heading // show the events