!function(C){C.jqx.jqxWidget("jqxCalendar","",{}),C.extend(C.jqx._jqxCalendar.prototype,{defineInstance:function(){var e={disabled:!1,restrictedDates:new Array,multipleMonthRows:1,multipleMonthColumns:1,minDate:C.jqx._jqxDateTimeInput.getDateTime(new Date),maxDate:C.jqx._jqxDateTimeInput.getDateTime(new Date),min:new Date(1900,0,1),max:new Date(2100,0,1),navigationDelay:400,stepMonths:1,width:null,height:null,value:C.jqx._jqxDateTimeInput.getDateTime(new Date),firstDayOfWeek:0,showWeekNumbers:!1,showDayNames:!0,enableWeekend:!1,enableOtherMonthDays:!0,showOtherMonthDays:!0,rowHeaderWidth:25,columnHeaderHeight:25,titleHeight:30,dayNameFormat:"firstTwoLetters",monthNameFormat:"default",titleFormat:["MMMM yyyy","yyyy","yyyy","yyyy"],enableViews:!0,readOnly:!1,culture:"default",enableFastNavigation:!0,enableHover:!0,enableAutoNavigation:!0,enableTooltips:!1,backText:"Back",forwardText:"Forward",specialDates:new Array,keyboardNavigation:!0,selectionMode:"default",selectableDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],todayString:"Today",clearString:"Clear",showFooter:!1,selection:{from:null,to:null},canRender:!0,_checkForHiddenParent:!0,height:null,rtl:!1,view:"month",views:["month","year","decade"],changing:null,change:null,localization:{backString:"Back",forwardString:"Forward",todayString:"Today",clearString:"Clear",calendar:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",ISO:"yyyy-MM-dd hh:mm:ss"}}},events:["backButtonClick","nextButtonClick","valuechanged","cellMouseDown","cellMouseUp","cellSelected","cellUnselected","change","viewChange"]};return this===C.jqx._jqxCalendar.prototype||(C.extend(!0,this,e),this.minDate._setYear(1900),this.minDate._setMonth(1),this.minDate._setDay(1),this.minDate._setHours(0),this.minDate._setMinutes(0),this.minDate._setSeconds(0),this.minDate._setMilliseconds(0),this.maxDate._setYear(2100),this.maxDate._setMonth(1),this.maxDate._setDay(1),this.maxDate._setHours(0),this.maxDate._setMinutes(0),this.maxDate._setSeconds(0),this.maxDate._setMilliseconds(0),this.value._setHours(0),this.value._setMinutes(0),this.value._setSeconds(0),this.value._setMilliseconds(0)),e},_createFromInput:function(e){var t,i,a,s,l,r,n=this;"input"==n.element.nodeName.toLowerCase()&&(n.field=n.element,n.field.className&&(n._className=n.field.className),t={title:n.field.title},n.field.value&&(t.value=n.field.value),n.field.checked&&(t.checked=!0),n.field.id.length?t.id=n.field.id.replace(/[^\w]/g,"_")+"_"+e:t.id=C.jqx.utilities.createId()+"_"+e,!n.field.getAttribute("min")||"Invalid Date"!=(i=new Date(n.field.getAttribute("min")))&&(n.min=i),!n.field.getAttribute("max")||"Invalid Date"!=(a=new Date(n.field.getAttribute("max")))&&(n.max=a),(s=C("
",t))[0].style.cssText=n.field.style.cssText,n.width||(n.width=C(n.field).width()),n.height||(n.height=C(n.field).outerHeight()),C(n.field).hide().after(s),l=n.host.data(),n.host=s,n.host.data(l),n.element=s[0],n.element.id=n.field.id,n.field.id=t.id,n._className&&(n.host.addClass(n._className),C(n.field).removeClass(n._className)),n.field.tabIndex&&(r=n.field.tabIndex,n.field.tabIndex=-1,n.element.tabIndex=r))},createInstance:function(e){this._createFromInput("jqxCalendar"),this.setCalendarSize(),""===this.element.id&&(this.element.id=C.jqx.utilities.createId()),"date"==C.type(this.value)&&(this.value=C.jqx._jqxDateTimeInput.getDateTime(this.value)),this.element.innerHTML="",this.host.attr("data-role","calendar");this.element.id;var t,s=this;this.propertyChangeMap.width=function(e,t,i,a){s.setCalendarSize()},this.propertyChangeMap.height=function(e,t,i,a){s.setCalendarSize()},C.global&&C.global.preferCulture(this.culture),"default"!=this.culture&&(C.global?(C.global.preferCulture(this.culture),this.localization.calendar=C.global.culture.calendar):window.Globalize&&(t=window.Globalize.culture(this.culture),this.localization.calendar=t.calendar),this.firstDayOfWeek=this.localization.calendar.firstDay),"Back"!=this.localization.backString&&(this.backText=this.localization.backString),"Forward"!=this.localization.forwardString&&(this.forwardText=this.localization.forwardString),"Today"!=this.localization.todayString&&this.localization.todayString&&(this.todayString=this.localization.todayString),"Clear"!=this.localization.clearString&&this.localization.clearString&&(this.clearString=this.localization.clearString),this.localization.calendar&&null!=this.localization.calendar.firstDay&&"default"!=this.culture&&(this.firstDayOfWeek=this.localization.calendar.firstDay),this.setMaxDate(this.max,!1),this.setMinDate(this.min,!1),this.host.attr("tabIndex")||this.host.attr("tabIndex",0),this.host.css("outline","none"),this.host.addClass(this.toThemeProperty("jqx-calendar")),this.host.addClass(this.toThemeProperty("jqx-widget")),this.host.addClass(this.toThemeProperty("jqx-widget-content")),this.host.addClass(this.toThemeProperty("jqx-rc-all")),this._addInput(),-1==this.views.indexOf("month")&&(this.view="year"),-1==this.views.indexOf("year")&&-1==this.views.indexOf("month")&&(this.view="decade"),this.addHandler(this.host,"keydown",function(e){var t=!0;return s.keyboardNavigation&&null!=s._handleKey&&((t=s._handleKey(e))||(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault())),t});var i=!1,a=this,l=!1;null!=s.width&&-1!=s.width.toString().indexOf("%")&&(l=!0),null!=s.height&&-1!=s.height.toString().indexOf("%")&&(l=!0),C.jqx.utilities.resize(this.host,function(){var e=a.host.find("#View"+s.element.id);i?a.refreshTitle(e):(i=!0,a.render()),l&&(s.refreshTimer&&clearTimeout(s.refreshTimer),s.refreshTimer=setTimeout(function(){s.refreshControl()},1))},!1,this._checkForHiddenParent);this.propertyChangeMap.disabled=function(e,t,i,a){a?e.host.addClass(s.toThemeProperty("jqx-fill-state-disabled")):e.host.removeClass(s.toThemeProperty("jqx-fill-state-disabled")),s.refreshControl()}},_addInput:function(){var e=this.host.attr("name");this.input=C(""),this.host.append(this.input),e&&this.input.attr("name",e),this.input.val(this.getDate().toString())},setCalendarSize:function(){(null!=this.width&&-1!=this.width.toString().indexOf("px")||null!=this.width&&!isNaN(this.width))&&this.host.width(this.width),null!=this.width&&-1!=this.width.toString().indexOf("%")&&this.host.css("width",this.width),(null!=this.height&&-1!=this.height.toString().indexOf("px")||null!=this.height&&!isNaN(this.height))&&this.host.height(this.height),null!=this.height&&-1!=this.height.toString().indexOf("%")&&this.host.css("height",this.height)},_getYearAndMonthPart:function(e){return e?new Date(e.getFullYear(),e.getMonth(),1):new Date(1900,0,1)},_handleKey:function(e){if(this.readOnly)return!0;var t=e.keyCode,i=this._getSelectedDate();if(null==i){if("month"!=this.view||37!=t&&38!=t&&39!=t&&40!=t)return!0;this.selectedDate=new Date(this.value.year,this.value.month-1,1),this._selectDate(this.selectedDate,"key"),i=this.selectedDate}if(e.altKey)return!0;if(this._animating)return!1;if("month"!=this.view&&13==t&&(_=this._getSelectedCell(),this._setDateAndSwitchViews(_,e,"keyboard")),"year"==this.view){var a,s=i.getMonth(),l=this._getYearAndMonthPart(this.getMinDate()),r=this._getYearAndMonthPart(this.getMaxDate());switch(t){case 37:return 0==s?l<=(a=new Date(i.getFullYear()-1,11,1))?(this.selectedDate=a,this.navigateBackward()):this.selectedDate!=l&&(this.selectedDate=l,this.navigateBackward()):l<=(a=new Date(i.getFullYear(),s-1,1))&&this._selectDate(a,"key"),!1;case 38:return(a=new Date(i.getFullYear(),s-4,1))this.getMaxDate())return!1;if(g.dateTime>f)if(!this.navigateForward())return!1;if(this._isDisabled(g.dateTime))return!1;this._selectDate(g.dateTime,"key");for(y=0;y=g.dateTime){this.value.day=p.getDate(),this.navigateForward(),this._selectDate(g.dateTime,"key");break}}return!1}if(37==t){if(g._addDays(-1),g.dateTimethis.getMaxDate())return!1;if(this._isDisabled(g.dateTime))return!1;this.navigateBackward(),this._selectDate(g.dateTime,"key");break}}return!1}if(39!=t)return!0;if(g._addDays(1),g.dateTime>this.getMaxDate())return!1;if(g.dateTime>f&&!this.navigateForward())return!1;if(this._isDisabled(g.dateTime))return!1;this._selectDate(g.dateTime,"key");for(y=0;y=g.dateTime){if(g.dateTimethis.getMaxDate())return!1;this.navigateForward(),this._selectDate(g.dateTime,"key");break}}return!1},render:function(){var e;this.canRender&&(this.host.children().remove(),e=this._renderSingleCalendar("View"+this.element.id),this.host.append(e))},addSpecialDate:function(e,t,i){var a;1==this.multipleMonthRows&&1==this.multipleMonthColumns&&(a=this.specialDates.length,this.specialDates[a]={Date:e,Class:t,Tooltip:i},this.refreshControl())},refresh:function(e){var t=this;this.render(),setTimeout(function(){t.refreshControl()})},invalidate:function(){this.refreshControl()},refreshControl:function(){1==this.multipleMonthRows&&1==this.multipleMonthColumns&&this.refreshSingleCalendar("View"+this.element.id,null)},getViewStart:function(){var e=this.getVisibleDate();return this.getFirstDayOfWeek(e).dateTime},getViewEnd:function(){var e=this.getViewStart(),t=new C.jqx._jqxDateTimeInput.getDateTime(e);return t._addDays(41),t.dateTime},refreshSingleCalendar:function(e,t){var i,a,s,l,r,n,h;this.canRender&&(i=this.host.find("#"+e),a=this.getVisibleDate(),s=this.getFirstDayOfWeek(a),this.refreshCalendarCells(i,s,e),this.refreshTitle(i),this.refreshRowHeader(i,e),null!=this.selectedDate&&this._selectDate(this.selectedDate),l=parseInt(this.month.css("padding-top")),r=this.host.height()-2*l-this.titleHeight-this.columnHeaderHeight,this.showDayNames||(r=this.month.height()-this.titleHeight),this.showFooter&&(r-=20),n=i.find("#cellsTable"+e),h=i.find("#calendarRowHeader"+e),n.height(r),h.height(r))},refreshRowHeader:function(e,t){if(this.showWeekNumbers){var i=this.getVisibleDate(),a=this.getFirstDayOfWeek(i),s=(a.dayOfWeek,this.getWeekOfYear(a)),l=new C.jqx._jqxDateTimeInput.getDateTime(new Date(a.dateTime));l._addDays(5),l.dayOfWeek=l.dateTime.getDay();this.getWeekOfYear(l);var r=this.rowHeader.find("table");r.width(this.rowHeaderWidth);for(var n=a,h=new Array,d=0;d<6;d++){s.toString();var o=new C.jqx._jqxCalendar.cell(n.dateTime),c=d+1+this.element.id,u=C(r[0].rows[d].cells[0]);o.element=u,o.row=d,o.column=0;var g=u.find("#headerCellContent"+c);g.addClass(this.toThemeProperty("jqx-calendar-row-cell")),g[0].innerHTML=s,h[d]=o,n=new C.jqx._jqxDateTimeInput.getDateTime(new Date(n._addWeeks(1))),s=this.getWeekOfYear(n)}var m=C.data(this.element,e[0].id);m.rowCells=h,this._refreshOtherMonthRows(m,t)}},_refreshOtherMonthRows:function(e,t){if(!this.showOtherMonthDays){this._displayLastRow(!0,t),this._displayFirstRow(!0,t);for(var i=!1,a=!1,s=0;s=e.cells.length-7&&(a=!0)}i||this._displayFirstRow(!1,t),a||this._displayLastRow(!1,t)}},_displayLastRow:function(e,t){var i=this.host.find("#"+t),a=i.find("#calendarRowHeader"+i[0].id).find("table"),s=null;this.showWeekNumbers&&a[0].cells&&(s=C(a[0].rows[5]));var l=C(i.find("#cellTable"+i[0].id)[0].rows[5]);e?(this.showWeekNumbers&&s&&s.css("display","table-row"),l.css("display","table-row")):(this.showWeekNumbers&&s&&s.css("display","none"),l.css("display","none"))},_displayFirstRow:function(e,t){var i=this.host.find("#"+t),a=i.find("#calendarRowHeader"+i[0].id).find("table"),s=null;this.showWeekNumbers&&a[0].cells&&(s=C(a[0].rows[0]));var l=C(i.find("#cellTable"+i[0].id)[0].rows[0]);e?(this.showWeekNumbers&&s&&s.css("display","table-row"),l.css("display","table-row")):(this.showWeekNumbers&&s&&s.css("display","none"),l.css("display","none"))},_renderSingleCalendar:function(e,t){if(this.canRender){var i=this.host.find("#"+e.toString());null!=i&&i.remove();var a=C(""),s=this.getVisibleDate(),l=this.getFirstDayOfWeek(s),r=new C.jqx._jqxDateTimeInput.getDateTime(l.dateTime);r._addMonths(1);var n=C.jqx._jqxCalendar.monthView(l,r,null,null,null,a);null==t||null==t?(this.host.append(a),a[0].style.width="100%",a[0].style.height="100%"):t.append(a),C.data(this.element,e,n);var h=parseInt(a.css("padding-top")),d=this.host.height()-2*h,o=d-this.titleHeight-this.columnHeaderHeight;this.showDayNames||(o=d-this.titleHeight),this.showFooter&&(o-=20),this.rowHeaderWidth<0&&(this.rowHeaderWidth=0),this.columnHeaderHeight<0&&(this.columnHeaderHeight=0),this.titleHeight<0&&(this.titleHeight=0);var c=this.rowHeaderWidth,u=this.columnHeaderHeight;this.showWeekNumbers||(c=0),this.showDayNames||(u=0);var g="",m="",f="";a[0].innerHTML=g+m+f,this.header=a.find("#calendarHeader"),this.header[0].id="calendarHeader"+e,this.header.addClass(this.toThemeProperty("calendar-header")),this.columnHeader=a.find("#calendarColumnHeader"),this.columnHeader[0].id="calendarColumnHeader"+e,this.table=a.find("#cellsTable"),this.table[0].id="cellsTable"+e,this.rowHeader=a.find("#calendarRowHeader"),this.rowHeader[0].id="calendarRowHeader"+e,this.selectCell=a.find("#selectCell"),this.selectCell[0].id="selectCell"+e,this.title=a.find("#calendarTitle"),this.title[0].id="calendarTitle"+e,this.leftButton=a.find("#leftNavigationArrow"),this.leftButton[0].id="leftNavigationArrow"+e,this.titleHeader=a.find("#calendarTitleHeader"),this.titleHeader[0].id="calendarTitleHeader"+e,this.rightButton=a.find("#rightNavigationArrow"),this.rightButton[0].id="rightNavigationArrow"+e,this.footer=a.find("#calendarFooter"),this._footer=a.find("#footer"),this._footer[0].id="footer"+e,this.footer[0].id="calendarFooter"+e,this.todayButton=a.find("#todayButton"),this.todayButton[0].id="todayButton"+e,this.doneButton=a.find("#doneButton"),this.doneButton[0].id="doneButton"+e,this.title.addClass(this.toThemeProperty("jqx-calendar-title-container"));var v,D,w,y,p=20;this.showFooter&&this._footer.css("display","block"),a.find("tr").addClass(this.toThemeProperty("jqx-reset")),a.addClass(this.toThemeProperty("jqx-widget-content")),a.addClass(this.toThemeProperty("jqx-calendar-month-container")),this.month=a,this.selectCell.addClass(this.toThemeProperty("jqx-reset")),this.selectCell.addClass(this.toThemeProperty("jqx-calendar-top-left-header")),this.showWeekNumbers?this._renderRowHeader(a):(this.table[0].colSpan=3,this.columnHeader[0].colSpan=3,this.rowHeader.css("display","none"),this.selectCell.css("display","none")),this.showFooter&&(this.footer.height(20),(v=C(""+this.todayString+"")).appendTo(this.todayButton),(D=C(""+this.clearString+"")).appendTo(this.doneButton),D.addClass(this.toThemeProperty("jqx-calendar-footer")),v.addClass(this.toThemeProperty("jqx-calendar-footer")),w=this,y="mousedown",C.jqx.mobile.isTouchDevice()&&(y=C.jqx.mobile.getTouchEventName("touchstart")),this.addHandler(v,y,function(){return w.today?w.today():w.setDate(new Date,"mouse"),!1}),this.addHandler(D,y,function(){return w.clear?w.clear():w.setDate(null,"mouse"),!1})),"month"!=this.view&&this.header.hide(),this.showDayNames&&"month"==this.view&&this.renderColumnHeader(a),this.oldView=this.view,this.renderCalendarCells(a,l,e),null!=t&&null!=t||this.renderTitle(a),this._refreshOtherMonthRows(n,e),a.find("tbody").css({border:"none",background:"transparent"}),null!=this.selectedDate&&this._selectDate(this.selectedDate);var _=this;return this.addHandler(this.host,"focus",function(){_.focus()}),a}},_getTitleFormat:function(){switch(this.view){case"month":return this.titleFormat[0];case"year":return this.titleFormat[1];case"decade":return this.titleFormat[2];case"centuries":return this.titleFormat[3]}},renderTitle:function(e){var i=C(""),a=C(""),t=this.title;t.addClass(this.toThemeProperty("jqx-reset")),t.addClass(this.toThemeProperty("jqx-widget-header")),t.addClass(this.toThemeProperty("jqx-calendar-title-header"));var s,l,r,n=t.find("td");C.jqx.browser.msie&&C.jqx.browser.version<8?("transparent"!=n.css("background-color")&&(s=t.css("background-color"),n.css("background-color",s)),"transparent"!=n.css("background-image")&&(l=t.css("background-image"),r=t.css("background-repeat"),t.css("background-position"),n.css("background-image",l),n.css("background-repeat",r),n.css("background-position","left center scroll"))):n.css("background-color","transparent"),this.disabled&&t.addClass(this.toThemeProperty("jqx-calendar-title-header-disabled")),i.addClass(this.toThemeProperty("jqx-calendar-title-navigation")),i.addClass(this.toThemeProperty("jqx-icon-arrow-left")),i.appendTo(this.leftButton);var h=this.leftButton;a.addClass(this.toThemeProperty("jqx-calendar-title-navigation")),a.addClass(this.toThemeProperty("jqx-icon-arrow-right")),a.appendTo(this.rightButton);var d=this.rightButton;this.enableTooltips&&C(h).jqxTooltip&&(C(h).jqxTooltip({name:this.element.id,position:"mouse",theme:this.theme,content:this.backText}),C(d).jqxTooltip({name:this.element.id,position:"mouse",theme:this.theme,content:this.forwardText}));var o=this.titleHeader,c=this._format(this.value.dateTime,this._getTitleFormat(),this.culture);"decade"==this.view?c=this._format(this._renderStartDate,this._getTitleFormat(),this.culture)+" - "+this._format(this._renderEndDate,this._getTitleFormat(),this.culture):"centuries"==this.view&&(c=this._format(this._renderCenturyStartDate,this._getTitleFormat(),this.culture)+" - "+this._format(this._renderCenturyEndDate,this._getTitleFormat(),this.culture));var u=C(""+c+"
");o.append(u),u.addClass(this.toThemeProperty("jqx-calendar-title-content"));var g=parseInt(i.width()),m=e.width()-2*g;o.find(".jqx-calendar-title-content").width(m);C.data(i,"navigateLeft",this),C.data(a,"navigateRight",this);var f,v=C.jqx.mobile.isTouchDevice();this.disabled||((f=this).addHandler(o,"mousedown",function(e){if(f.enableViews){if(!f._viewAnimating&&!f._animating){var t,i,a,s,l=f.view;switch(f.oldView=l,f.view){case"month":f.view="year";break;case"year":f.view="decade"}-1==f.views.indexOf("year")&&"year"==f.view&&(f.view="decade"),-1==f.views.indexOf("decade")&&"decade"==f.view&&(f.view=l),l!=f.view&&(t="View"+f.element.id,i=f.host.find("#"+t),a=f.getVisibleDate(),s=f.getFirstDayOfWeek(a),f.renderCalendarCells(i,s,t,!0),f.refreshTitle(i),f._raiseEvent("8"))}return!1}}),this.addHandler(i,"mousedown",function(e){if(f._animating)return!1;C.data(i,"navigateLeftRepeat",!0);var t=C.data(i,"navigateLeft");return t.enableFastNavigation&&!v&&t.startRepeat(t,i,!0,f.navigationDelay+200),t.navigateBackward(f.stepMonths,"arrow"),e.stopPropagation(),e.preventDefault(),t._raiseEvent(0,e)}),this.addHandler(i,"mouseup",function(e){C.data(i,"navigateLeftRepeat",!1)}),this.addHandler(i,"mouseleave",function(e){C.data(i,"navigateLeftRepeat",!1)}),this.addHandler(a,"mousedown",function(e){if(f._animating)return!1;C.data(a,"navigateRightRepeat",!0);var t=C.data(a,"navigateRight");return t.enableFastNavigation&&!v&&t.startRepeat(t,a,!1,f.navigationDelay+200),t.navigateForward(f.stepMonths,"arrow"),e.stopPropagation(),e.preventDefault(),t._raiseEvent(1,e)}),this.addHandler(a,"mouseup",function(e){C.data(a,"navigateRightRepeat",!1)}),this.addHandler(a,"mouseleave",function(e){C.data(a,"navigateRightRepeat",!1)}))},refreshTitle:function(e){var t=this._format(this.value.dateTime,this._getTitleFormat(),this.culture);"decade"==this.view?t=this._format(this._renderStartDate,this._getTitleFormat(),this.culture)+" - "+this._format(this._renderEndDate,this._getTitleFormat(),this.culture):"centuries"==this.view&&(t=this._format(this._renderCenturyStartDate,this._getTitleFormat(),this.culture)+" - "+this._format(this._renderCenturyEndDate,this._getTitleFormat(),this.culture));var i,a,s=this.titleHeader;this.titleHeader&&(i=s.find(".jqx-calendar-title-content"),a=C(""+t+"
"),s.append(a),a.addClass(this.toThemeProperty("jqx-calendar-title-content")),null!=i&&i.remove())},startRepeat:function(t,i,a,s){var l=window.setTimeout(function(){var e=C.data(i,"navigateLeftRepeat");a||(e=C.data(i,"navigateRightRepeat")),e?(s<25&&(s=25),a?(t.navigateBackward(1,"arrow"),t.startRepeat(t,i,!0,s)):(t.navigateForward(1,"arrow"),l=t.startRepeat(t,i,!1,s))):window.clearTimeout(l)},s)},navigateForward:function(e,t){null!=e&&null!=e||(e=this.stepMonths);var i=this.value.year;if("decade"==this.view){if(i=this._renderStartDate.getFullYear()+12,this._renderEndDate.getFullYear()>=this.getMaxDate().getFullYear())return}else"year"==this.view?i=this.value.year+1:"centuries"==this.view&&(i=this.value.year+100);if("month"!=this.view){var a=this.getMaxDate().getFullYear();if((athis._renderEndDate.getFullYear()))return;this.value.year=i,this.value.month=1,this.value.day=1}this.value.year=i,this.value.month=1,this.value.day=1}var s,l,r=this.value.day;return this.value.month+e<=12&&((s=this.value._daysInMonth(this.value.year,this.value.month+e))=a.valueOf()&&e.valueOf()<=s.valueOf())return!0}else if(i.getMonth()==e.getMonth()&&i.getDate()==e.getDate()&&i.getFullYear()==e.getFullYear())return!0}return!1},_isDisabled:function(e){var t=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()];return-1==this.selectableDays.indexOf(t)||!!this._isRestrictedDate(e)},refreshCalendarCells:function(e,t,i){if("year"!=this.view&&"decade"!=this.view&&"centuries"!=this.view){for(var a=this.table.find("#cellTable"+i.toString()),s=t,l=new Array,r=0,n=new C.jqx._jqxDateTimeInput.getDateTime(new Date),h=0;h<6;h++)for(var d=0;d<7;d++){var o=h+1,c=d;this.rtl&&(c=6-c);var u=c+1,g="#cell"+o+u+this.element.id,m=new Date(s.dateTime.getFullYear(),s.dateTime.getMonth(),s.dateTime.getDate()),f=new C.jqx._jqxCalendar.cell(m),v=C(a[0].rows[h].cells[u-1]);v[0].id=g.substring(1),f.element=v,f.row=h,f.column=d,f.isVisible=!0,f.isOtherMonth=!1,f.isToday=!1,f.isWeekend=!1,f.isHighlighted=!1,f.isSelected=!1,s.month!=this.value.month&&(f.isOtherMonth=!0,f.isVisible=this.showOtherMonthDays),this._isRestrictedDate(m)&&(f.isRestricted=!0,f.isDisabled=!0),f.isDisabled||(mthis.getMaxDate()||this._isDisabled(m))&&(f.isDisabled=!0),s.month==n.month&&s.day==n.day&&s.year==n.year&&(f.isToday=!0),s.isWeekend()&&(f.isWeekend=!0),C.data(this.element,"cellContent"+g.substring(1),f),C.data(this.element,g.substring(1),f),l[r]=f,r++,C.jqx.utilities.html(v,s.day),this._applyCellStyle(f,v,v),s=new C.jqx._jqxDateTimeInput.getDateTime(new Date(s._addDays(1)))}var D=C.data(this.element,e[0].id);null!=D&&null!=D&&(D.cells=l),this.renderedCells=l,this._refreshOtherMonthRows(D,i)}else this.refreshViews(e,t,i)},_getDecadeAndCenturiesData:function(){var e=new Array,t=new Array,i=this.getMaxDate().getFullYear()-this.getMinDate().getFullYear();i<12&&(i=12);var a=this.getMinDate(),s=this.getMaxDate(),l=this.value.dateTime.getFullYear();if("decade"==this.view){l+12>s.getFullYear()&&(l=s.getFullYear()-11),l=a.getFullYear()&&u.getFullYear()<=s.getFullYear()&&(e.push("-"+u.getFullYear()+"-"+(u.getFullYear()+9)),t.push(u),0==d&&(this._renderCenturyStartDate=u),this._renderCenturyEndDate=new Date(u.getFullYear()+9,0,1))}break}}return{years:e,dates:t}},refreshViews:function(e,t,i){for(var a=new Array,s=e.find("#cellTable"+i.toString()),l=this._getDecadeAndCenturiesData(),r=l.years,n=l.dates,h=0,d=this.getMinDate(),o=this.getMaxDate(),c=0;c<3;c++)for(var u=0;u<4;u++){var g=u;this.rtl&&(g=3-g);(y=new Date(this.value.dateTime)).setDate(1),y.setMonth(4*c+g);var m=new C.jqx._jqxCalendar.cell(y),f=s[0].rows["row"+(1+c)+this.element.id],v=C(f.cells[u]);m.isSelected=!1,m.isVisible=!0,m.element=v,m.row=c,m.column=u,m.index=a.length;var D="";if("year"==this.view){var w=this.localization.calendar.months.names[4*c+g];switch(this.monthNameFormat){case"default":w=this.localization.calendar.months.namesAbbr[4*c+g];break;case"shortest":w=this.localization.calendar.months.namesShort[4*c+g];break;case"firstTwoLetters":w=w.substring(0,2);break;case"firstLetter":w=w.substring(0,1)}D=w}else"decade"!=this.view&&"centuries"!=this.view||(null==(D=r[4*c+g])&&(D="2013"),m.setDate(n[4*c+g]));var y=m.getDate();"year"==this.view?y.getMonth()==this.getDate().getMonth()&&y.getFullYear()==this.getDate().getFullYear()&&(m.isSelected=!0):y.getFullYear()==this.getDate().getFullYear()&&(m.isSelected=!0),"year"==this.view?(this._getYearAndMonthPart(y)this._getYearAndMonthPart(o)&&(m.isDisabled=!0)):(y.getFullYear()o.getFullYear()&&(m.isDisabled=!0)),C.jqx.utilities.html(v,D),a[h]=m,h++}var p=C.data(this.element,e[0].id);null!=p&&null!=p&&(p.cells=a),this.renderedCells=a,this._applyCellStyles()},_createViewClone:function(){var e=this.host.find(".jqx-calendar-month"),t=e.clone();return t.css("position","absolute"),t.css("top",e.position().top),t.width(this.month.width()),t},_addCellsTable:function(e,t){var i=this,a=this.showFooter?20:0;"month"!=this.view?t.height(this.month.height()-this.titleHeight):t.height(this.month.height()-this.titleHeight-this.columnHeaderHeight-a),this._viewAnimating=!0;var s=this.host.find(".jqx-calendar-month-container");s.css("position","relative");this.host.find(".jqx-calendar-month");var l=this._createViewClone();s.append(l),"month"!=this.view?(this.header.fadeOut(0),this.showWeekNumbers&&this.rowHeader.fadeOut(0),this.showFooter&&this._footer.fadeOut(0)):(this.header.fadeIn(this.navigationDelay+200),this.showWeekNumbers&&this.rowHeader.fadeIn(this.navigationDelay+200),this.showFooter&&this._footer.fadeIn(this.navigationDelay+200)),e.children().remove(),e.append(t),this._animateViews(l,t,function(){i.selectedDate||"range"==i.selectionMode||(i.selectedDate=i.renderedCells[0].getDate());try{i.renderedCells[0].element.focus(),setTimeout(function(){i.renderedCells[0].element.focus()},10)}catch(e){}i._viewAnimating=!1}),t.addClass(this.toThemeProperty("jqx-calendar-view"))},_animateViews:function(e,t,i){if(this._viewAnimating=!0,this.oldView==this.view)return e.remove(),t.fadeOut(0),t.fadeIn(0),void i();e.fadeOut(this.navigationDelay+100,function(){e.remove()}),t.fadeOut(0),t.fadeIn(this.navigationDelay+200,function(){i()})},focus:function(){if(!this.disabled)try{this.renderedCells&&0 | | | |
| | | |
| | | |
");this.host.find(".jqx-calendar-month-container").css("position","relative");var r=e.find("#cellsTable"+e[0].id);r[0].style.borderColor="transparent";var n=this._getDecadeAndCenturiesData(),h=n.years,d=n.dates,o=0,c=this.getMinDate(),u=this.getMaxDate(),g=new Date(this.value.dateTime);g.setDate(1);for(var m=0;m<3;m++)for(var f=0;f<4;f++){var v=f;this.rtl&&(v=3-v);var D=l[0].rows["row"+(1+m)+this.element.id];(x=new Date(g)).setMonth(4*m+v);var w=new C.jqx._jqxCalendar.cell(x),y=C(D.cells[f]);w.isVisible=!0,w.element=y,w.row=m,w.column=f,w.index=s.length,w.isSelected=!1;var p="";if("year"==this.view){x.getMonth()==this.getDate().getMonth()&&x.getFullYear()==this.getDate().getFullYear()&&(w.isSelected=!0);var _=this.localization.calendar.months.names[4*m+v];switch(this.monthNameFormat){case"default":_=this.localization.calendar.months.namesAbbr[4*m+v];break;case"shortest":_=this.localization.calendar.months.namesShort[4*m+v];break;case"firstTwoLetters":_=_.substring(0,2);break;case"firstLetter":_=_.substring(0,1)}p=_}else"decade"!=this.view&&"centuries"!=this.view||(p=h[4*m+v],w.setDate(d[4*m+v]),w.getDate().getFullYear()==this.getDate().getFullYear()&&(w.isSelected=!0),null==p&&(p="2013"));var b,T,x=w.getDate();"year"==this.view?((b=new Date(x)).setDate(1),b.setHours(0,0,0,0),b.setMonth(x.getMonth()+1),b=new Date(b.valueOf()-1),(this._getYearAndMonthPart(x)this._getYearAndMonthPart(u)||!this._hasUnrestrictedRanges(x,b))&&(w.isDisabled=!0)):((T=new Date(x)).setMonth(0),T.setDate(1),T.setHours(0,0,0,0),T.setFullYear(x.getFullYear()+1),T=new Date(T.valueOf()-1),(x.getFullYear()u.getFullYear()||!this._hasUnrestrictedRanges(x,T))&&(w.isDisabled=!0)),C.jqx.utilities.html(y,p),s[o]=w,o++}C.each(s,function(){var e=this.element,i=this;a.disabled||(a.addHandler(e,"mousedown",function(e){a._setDateAndSwitchViews(i,e,"mouse")}),a.addHandler(e,"mouseover",function(e){var t=a.renderedCells[i.index];"centuries"!=a.view&&-1!=t.element.html().toLowerCase().indexOf("span")||(t.isHighlighted=!0,a._applyCellStyle(t,t.element,t.element))}),a.addHandler(e,"mouseout",function(e){var t=a.renderedCells[i.index];"centuries"!=a.view&&-1!=t.element.html().toLowerCase().indexOf("span")||(t.isHighlighted=!1,a._applyCellStyle(t,t.element,t.element))}))});var M=C.data(this.element,e[0].id);null!=M&&null!=M&&(M.cells=s),this.renderedCells=s,this._addCellsTable(r,l),this._applyCellStyles()},_setDateAndSwitchViews:function(e,t,i){if(!this._viewAnimating&&!this._animating){this.getDate();var l=this.renderedCells[e.index].getDate(),a=this.value.dateTime.getDate(),s=new Date(l);-1!=this.views.indexOf("month")?s.setDate(a):(s.setDate(1),l.setDate(1)),s.getMonth()==l.getMonth()&&(l=s);var r=this.getMinDate(),n=this.getMaxDate();if("year"==this.view){if(this._getYearAndMonthPart(l)this._getYearAndMonthPart(n))return}else{if(l.getFullYear()n.getFullYear())return}switch("range"!=this.selectionMode&&this._selectDate(l,i),this.oldView=this.view,this.view){case"year":this.view="month";break;case"decade":this.view="year"}-1==this.views.indexOf("month")&&(this.view="year"),-1==this.views.indexOf("year")&&(this.view="decade"),"year"==this.view?(this._getYearAndMonthPart(l)this._getYearAndMonthPart(n)&&(l=n)):(l.getFullYear()n.getFullYear()&&(l=n)),this.changing&&this.selectedDate&&(this.selectedDate.getFullYear()!=l.getFullYear()||this.selectedDate.getMonth()!=l.getMonth()||this.selectedDate.getDate()!=l.getDate())&&(l=this.selectedDate),this.value._setYear(l.getFullYear()),this.value._setDay(l.getDate()),this.value._setMonth(l.getMonth()+1),this.value._setDay(l.getDate());var h,d=this.getVisibleDate(),o=this.getFirstDayOfWeek(d),c="View"+this.element.id;this.renderCalendarCells(this.month,o,c,!0),this.refreshTitle(this.month),this.showWeekNumbers&&this.refreshRowHeader(this.month,c),3==this.views.length&&"month"==this.view&&("range"!=this.selectionMode?this._selectDate(this.selectedDate,"view"):(h=this,C.each(this.renderedCells,function(e){var t=this,i=t.getDate(),a=C(t.element);if(0==a.length)return!1;function s(e){if(null==e)return new Date;var t=new Date;return t.setHours(0,0,0,0),t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t}t.isOtherMonth||s(i).toString()!=s(l).toString()||(h.value._setMonth(l.getMonth()+1),h.value._setDay(l.getDate()),h.value._setYear(l.getFullYear())),t.isSelected=!1,t.isDisabled=!1,s(i)i&&(t.isDisabled=!0),h._isDisabled(i)&&(t.isDisabled=!0),t.isDisabled||s(i)>=s(h.selection.from)&&s(i)<=s(h.selection.to)&&(t.isSelected=!0)}),this._applyCellStyles())),"month"!=this.view&&("year"==this.oldView||-1==this.views.indexOf("year")&&"decade"==this.view)&&("keyboard"!=i&&this._raiseEvent("3"),this._raiseEvent("5",{selectionType:"mouse"})),this._raiseEvent("8")}},renderCalendarCells:function(e,t,i,a){if("year"!=this.view&&"decade"!=this.view&&"centuries"!=this.view){var s,l=C(""),r=this.table;r[0].style.borderColor="transparent",null==a&&(null!=(s=r.find("#cellTable"+i.toString()))&&s.remove(),r.append(l));var n=t,h=this.showDayNames?1:0,d=this.showWeekNumbers?1:0,o=new Array,c=0,u=(e.width()-this.rowHeaderWidth-2)/7;this.showWeekNumbers||(u=(e.width()-2)/7),u=parseInt(u);for(var g=new C.jqx._jqxDateTimeInput.getDateTime(new Date),m=0;m<6;m++){for(var f=0;f<7;f++){var v=m+1,D=f;this.rtl&&(D=6-D);var w=D+1,y="#cell"+v+w+this.element.id,p=new Date(n.dateTime.getFullYear(),n.dateTime.getMonth(),n.dateTime.getDate()),_=new C.jqx._jqxCalendar.cell(p),b=C(l[0].rows[m].cells[w-1]);b[0].id=y.substring(1),_.isVisible=!0,_.isDisabled=!1,n.month!=this.value.month&&(_.isOtherMonth=!0,_.isVisible=this.showOtherMonthDays),this._isRestrictedDate(p)&&(_.isRestricted=!0,_.isDisabled=!0),_.isDisabled||(pthis.getMaxDate()||this._isDisabled(p))&&(_.isDisabled=!0),n.month==g.month&&n.day==g.day&&n.year==g.year&&(_.isToday=!0),n.isWeekend()&&(_.isWeekend=!0),_.element=b,_.row=h,_.column=d,C.jqx.utilities.html(b,n.day),n=new C.jqx._jqxDateTimeInput.getDateTime(new Date(n._addDays(1))),C.data(this.element,"cellContent"+y.substring(1),_),C.data(this.element,""+y.substring(1),_);var T,x=this;x.isMaterialized()&&(C(b).addClass("ripple"),C.jqx.ripple(C(b))),this.addHandler(b,"mousedown",function(e){if(!x.readOnly&&!x.disabled){var t,i,a=C(e.target),s=C.data(x.element,a[0].id);x._raiseEvent(3,e);return null!=s&&null!=s&&(t=s.getDate(),x.getMinDate()<=t&&t<=x.getMaxDate()&&(s.isDisabled||(s.isOtherMonth&&x.enableAutoNavigation?(s.row<2?x.navigateBackward():x.navigateForward(),x._selectDate(s.getDate(),"mouse",e.shiftKey)):(new Date(x.getDate()),x._selectDate(s.getDate(),"mouse",e.shiftKey),x.value._setYear(t.getFullYear()),x.value._setDay(1),x.value._setMonth(t.getMonth()+1),x.value._setDay(t.getDate()),(i=x.host.find(".jqx-calendar-month")).stop(),i.css("margin-left","0px"),x.getDate(),x._raiseEvent("2"),s.isOtherMonth&&x._raiseEvent("5",{selectionType:"mouse"}))))),!1}}),x.disabled||(T=function(e,t){var i,a,s;x.readOnly||(i=C(e.target),null!=(a=C.data(x.element,i[0].id))&&null!=a&&(s=a.getDate(),x.getMinDate()<=s&&s<=x.getMaxDate()&&(a.isHighlighted=t,x._applyCellStyle(a,a.element,i))))},this.addHandler(b,"mouseenter",function(e){return T(e,!0),!1}),this.addHandler(b,"mouseleave",function(e){return T(e,!1),!1})),d++,o[c]=_,c++}d=0,h++}var M=C.data(this.element,e[0].id);null!=M&&null!=M&&(M.cells=o),this.renderedCells=o,null!=a&&this._addCellsTable(r,l),this._applyCellStyles(),this._refreshOtherMonthRows(M,i)}else this.renderViews(e,t,i)},setMaxDate:function(e,t){null!=e&&"string"==typeof e&&"Invalid Date"==(e=new Date(e))||(this.maxDate=C.jqx._jqxDateTimeInput.getDateTime(e),!1!==t&&this.render())},getMaxDate:function(){return null!=this.maxDate&&null!=this.maxDate?this.maxDate.dateTime:null},setMinDate:function(e,t){null!=e&&"string"==typeof e&&"Invalid Date"==(e=new Date(e))||(this.minDate=C.jqx._jqxDateTimeInput.getDateTime(e),!1!==t&&this.render())},getMinDate:function(){return null!=this.minDate&&null!=this.minDate?this.minDate.dateTime:null},navigateTo:function(e,t){if("month"==this.view){var i=this.getMinDate(),a=new Date(this.getMaxDate().getFullYear(),this.getMaxDate().getMonth()+1,this.getMaxDate().getDate());if(ethis._getYearAndMonthPart(a))return!1}else if(e&&(e.getFullYear()this.getMaxDate().getFullYear()))return!1;if(null==e)return!1;if(null==t){var s=this;if(this._animating)return;this._animating=!0;var l=this.host.find(".jqx-calendar-month-container"),r=C("");r[0].style.width="100%",r[0].style.height="100%",r[0].style.overflow="hidden",r[0].style.position="relative",r[0].style.left="0px",r[0].style.top="-100%",l.append(r),this._viewClone&&(this._viewClone.stop(),this._viewClone.remove()),this._newViewClone&&(this._newViewClone.stop(),this._newViewClone.remove()),(u=this.host.find(".jqx-calendar-month")).stop(),u.css("margin-left","0px");var n=u.clone();this._viewClone=n;var h=new Date(this.value.dateTime);this.value._setYear(e.getFullYear()),this.value._setDay(e.getDate()),this.value._setMonth(e.getMonth()+1);var d=parseInt(this.month.css("padding-top"));s.refreshControl(),r.css("overflow","hidden"),l.css("position","relative"),l.css("overflow","hidden"),n.css("position","absolute"),n.css("top",u.position().top-d),r.append(n),C.jqx.browser.msie&&C.jqx.browser.version<8&&(this.month.css("position","relative"),this.month.css("overflow","hidden"),this.table.css("position","relative"),this.table.css("overflow","hidden"));var o=-this.month.width();en&&(r.isDisabled=!0),m._isRestrictedDate(n)&&(r.isDisabled=!0,r.isRestricted=!0),!r.isDisabled&&m._isDisabled(n)&&(r.isDisabled=!0),m._applyCellStyle(r,h,d),!0;0==e&&("none"!=u?(null==m._clicks&&(m._clicks=0),m._clicks++,g&&m._clicks++,1==m._clicks?m.selection={from:c,to:c}:(a=(t=m.selection.from)<=c?c:t,(i=t<=c?t:c)&&(s=new Date(i.getFullYear(),i.getMonth(),i.getDate())),a&&(l=new Date(a.getFullYear(),a.getMonth(),a.getDate(),23,59,59)),m.selection={from:s,to:l},m._clicks=0)):null!=m.selection&&null!=m.selection.from||(m.selection={from:c,to:c},null==m._clicks&&(m._clicks=0),m._clicks++,2==m._clicks&&(m._clicks=0)));function o(e){if(null==e)return new Date;var t=new Date;return t.setHours(0,0,0,0),t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t}r.isOtherMonth||o(n).toString()!=o(c).toString()||(m.value._setMonth(c.getMonth()+1),m.value._setDay(c.getDate()),m.value._setYear(c.getFullYear()),m._raiseEvent("2"),m._raiseEvent("5",{selectionType:u})),r.isSelected=!1,r.isDisabled=f,o(n)n&&(r.isDisabled=!0),m._isRestrictedDate(n)&&(r.isRestricted=!0,r.isDisabled=!0),!r.isDisabled&&m._isDisabled(n)&&(r.isDisabled=!0),r.isDisabled?!m.allowRestrictedDaysInRange&&o(n)>=o(m.selection.from)&&m.selection.to==m.selection.from&&(f=!0):o(n)>=o(m.selection.from)&&o(n)<=o(m.selection.to)&&(r.isSelected=!0)}m._applyCellStyle(r,h,d)}),"range"!=m.selectionMode||0!=m._clicks?"range"!=m.selectionMode&&s!=c&&(m._raiseEvent(7,{selectionType:u}),this.change&&this.change(c)):m._raiseEvent(7,{selectionType:u})}}},_getSelectedDate:function(){var e=C.data(this.element,"View"+this.element.id);if(null!=e&&null!=e){if("month"!=this.view)return this.selectedDate;for(var t=0;t | | | | | | |
");t.find("table").addClass(this.toThemeProperty("jqx-reset")),t.find("tr").addClass(this.toThemeProperty("jqx-reset")),t.find("td").css({background:"transparent",padding:1,margin:0,border:"none"}),t.addClass(this.toThemeProperty("jqx-reset")),t.addClass(this.toThemeProperty("jqx-widget-content")),t.addClass(this.toThemeProperty("jqx-calendar-column-header")),this.columnHeader.append(t);var i=this.getVisibleDate(),a=this.getFirstDayOfWeek(i),s=(a.dayOfWeek,this.getWeekOfYear(a),this.firstDayOfWeek),l=this.localization.calendar.days.names,r=new Array,n=a,h=(e.width()-this.rowHeaderWidth-2)/7;this.showWeekNumbers||(h=(e.width()-2)/7);for(var d=0;d<7;d++){var o=l[s];switch(this.rtl&&(o=l[6-s]),this.dayNameFormat){case"default":o=this.localization.calendar.days.namesAbbr[s],this.rtl&&(o=this.localization.calendar.days.namesAbbr[6-s]);break;case"shortest":o=this.localization.calendar.days.namesShort[s],this.rtl&&(o=this.localization.calendar.days.namesShort[6-s]);break;case"firstTwoLetters":o=o.substring(0,2);break;case"firstLetter":o=o.substring(0,1)}var c=new C.jqx._jqxCalendar.cell(n.dateTime),u=d+1+this.element.id,g=C(t[0].rows[0].cells[d]),m=d;this.enableTooltips&&C(g).jqxTooltip&&C(g).jqxTooltip({name:this.element.id,content:l[s],theme:this.theme,position:"mouse"}),6<=s?s=0:s++,d=m,c.element=g,c.row=0,c.column=d+1;var f=this._textwidth(o),v=""+o+"
";if(g.append(v),g.find("#columnCell"+u).addClass(this.toThemeProperty("jqx-calendar-column-cell")),g.width(h),this.disabled&&g.find("#columnCell"+u).addClass(this.toThemeProperty("jqx-calendar-column-cell-disabled")),0g.width()&&0!=o.length;)o=o.substring(0,o.length-1),C.jqx.utilities.html(g.find("#columnCell"+u),o),f=this._textwidth(o);r[d]=c,n=new C.jqx._jqxDateTimeInput.getDateTime(new Date(n._addDays(1)))}parseInt(this.columnHeader.width())>parseInt(this.month.width())&&this.columnHeader.width(this.month.width()),C.data(this.element,e[0].id).columnCells=r}},_format:function(t,i,e){var a=!1;try{null!=window.Globalize?a=!0:document.Globalize&&(window.Globalize=document.Globalize,a=!0)}catch(e){document.Globalize&&(window.Globalize=document.Globalize,a=!0)}if(document.Globalize&&(window.Globalize=document.Globalize,a=!0),C.global)return C.global.culture.calendar=this.localization.calendar,C.global.format(t,i,this.culture);if(a)try{return window.Globalize.cultures[this.culture]&&(window.Globalize.cultures[this.culture].calendar=this.localization.calendar),window.Globalize.format(t,i,this.culture)}catch(e){return window.Globalize.format(t,i)}else if(C.jqx.dataFormat)return C.jqx.dataFormat.formatdate(t,i,this.localization.calendar)},_textwidth:function(e){var t=C(""+e+"");t.addClass(this.toThemeProperty("jqx-calendar-column-cell")),C(this.host).append(t);var i=t.width();return t.remove(),i},_textheight:function(e){var t=C(""+e+"");C(this.host).append(t);var i=t.height();return t.remove(),i},_renderRowHeader:function(e){var t=this.getVisibleDate(),i=this.getFirstDayOfWeek(t),a=(i.dayOfWeek,this.getWeekOfYear(i)),s=new C.jqx._jqxDateTimeInput.getDateTime(new Date(i.dateTime));s._addDays(5),s.dayOfWeek=s.dateTime.getDay();this.getWeekOfYear(s);53==a&&0==s.dateTime.getMonth()&&(a=1);var l=C("");l.find("table").addClass(this.toThemeProperty("jqx-reset")),l.find("td").addClass(this.toThemeProperty("jqx-reset")),l.find("tr").addClass(this.toThemeProperty("jqx-reset")),l.addClass(this.toThemeProperty("jqx-calendar-row-header")),l.width(this.rowHeaderWidth),this.rowHeader.append(l);for(var r=i,n=new Array,h=0;h<6;h++){var d=a.toString(),o=new C.jqx._jqxCalendar.cell(r.dateTime),c=h+1+this.element.id,u=C(l[0].rows[h].cells[0]);o.element=u,o.row=h,o.column=0;var g="";u.append(g),u.find("#headerCellContent"+c).addClass(this.toThemeProperty("jqx-calendar-row-cell")),n[h]=o,r=new C.jqx._jqxDateTimeInput.getDateTime(new Date(r._addWeeks(1))),a=this.getWeekOfYear(r)}C.data(this.element,e[0].id).rowCells=n},getFirstDayOfWeek:function(e){var t=e;(this.firstDayOfWeek<0||6this.maxDate&&(this.visibleDate=this.maxDate),e.dateTime.setHours(0);var t=e.day;return e=C.jqx._jqxDateTimeInput.getDateTime(e._addDays(1-t))},destroy:function(e){C.jqx.utilities.resize(this.host,null,!0),this.host.removeClass(),0!=e&&this.host.remove()},_raiseEvent:function(e,t){null==t&&(t={owner:null});var i=this.events[e],a=t||{};a.owner=this;var s,l,r,n=new C.Event(i);n.owner=this,n.args=a,0!=e&&1!=e&&2!=e&&3!=e&&4!=e&&5!=e&&6!=e&&7!=e&&8!=e||(n.args.date=n.args.selectedDate=this.getDate(),n.args.range=this.getRange(),s=this.getViewStart(),l=this.getViewEnd(),n.args.view={from:s,to:l}),7==e&&("key"==(r=(r=a.selectionType)||null)&&(r="keyboard"),"none"==r&&(r=null),a.type=r);var h=this.host.trigger(n);return 0!=e&&1!=e||(h=!1),h},propertyMap:function(e){return"value"==e?"range"!=this.selectionMode?this.getDate():this.getRange():null},_setSize:function(){var e,t,i=this.host.find("#View"+this.element.id);0