/// <reference path="/Telerik.UI/js/ui.js" />
/// <reference path="//Microsoft.WinJS.1.0/js/ui.js" />  
/// <reference path="//Microsoft.WinJS.1.0/js/base.js" /> 
(function () {
    "use strict";

    WinJS.UI.Pages.define("pages/calendar/calendar.html", {
        ready: function (element, options) {
            var calendar1 = myCalendar1.winControl;
            var calendar2 = new Telerik.UI.RadCalendar(myCalendar2);
            calendar1.addEventListener("change",function(e) {
                if (calendar1.current) {
                    calendar2.min = calendar1.current;
                }
                else {
                    calendar2.min = new Date(1900, 1, 1); 
                    
                }
            })
            calendar1.onnavigate = function(e) {
                calendar2.navigate(calendar1.current);
            }
        },

        unload: function () {
        },

        updateLayout: function (element, viewState, lastViewState) {
        }
    });
})();
