Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-calendars

Package Overview
Dependencies
Maintainers
2
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-calendars - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

dist\global\calendar.js

2

dist/ej2-calendars.umd.min.js

@@ -11,2 +11,2 @@ /*!

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@syncfusion/ej2-base"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-base"],t);else{var r=t("object"==typeof exports?require("@syncfusion/ej2-base"):e["@syncfusion/ej2-base"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){var n,i;n=[r,t,r(1)],void 0!==(i=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r)}.apply(t,n))&&(e.exports=i)},function(e,t,r){var n,i;n=[r,t,r(2)],void 0!==(i=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r)}.apply(t,n))&&(e.exports=i)},function(e,t,r){var n,i,a=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),s=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};n=[r,t,r(3),r(3),r(3),r(4),r(8)],void 0!==(i=function(e,t,r,n,i,o,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h="e-disabled",c="e-overlay",u="e-other-month",d="e-selected",p="e-focused-date",v=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.keyConfigs={controlUp:"ctrl+38",controlDown:"ctrl+40",moveDown:"downarrow",moveUp:"uparrow",moveLeft:"leftarrow",moveRight:"rightarrow",select:"enter",home:"home",end:"end",pageUp:"pageup",pageDown:"pagedown",shiftPageUp:"shift+pageup",shiftPageDown:"shift+pagedown",controlHome:"ctrl+home",controlEnd:"ctrl+end"},n}return a(t,e),t.prototype.render=function(){this.globalize=new r.Internationalization(this.locale),this.element.classList.add("e-calendar"),this.enableRtl&&this.element.classList.add("e-rtl"),o.attributes(this.element,{role:"calendar"}),this.processDate(),this.header(),this.content(),this.wireEvents()},t.prototype.processDate=function(){this.validateDate(),this.minMaxUpdate()},t.prototype.validateDate=function(){this.currentDate=this.currentDate?this.currentDate:this.resetTime(new Date),!l.isNullOrUndefined(this.value)&&this.min<=this.max&&this.value>=this.min&&this.value<=this.max&&(this.setProperties({value:this.resetTime(this.value)},!0),this.currentDate=this.resetTime(new Date(this.value))),isNaN(+this.value)&&this.setProperties({value:null},!0),this.min<=this.max||(this.setProperties({min:this.min},!0),this.setProperties({max:new Date(2099,11,31)},!0))},t.prototype.minMaxUpdate=function(){this.min=l.isNullOrUndefined(this.min)||!+this.min?this.min=new Date(1900,0,1):this.min,this.max=l.isNullOrUndefined(this.max)||!+this.max?this.max=new Date(2099,11,31):this.max,!l.isNullOrUndefined(this.value)&&this.value<=this.min&&this.min<=this.max?(this.setProperties({value:this.resetTime(this.min)},!0),this.changedArgs={value:this.value}):!l.isNullOrUndefined(this.value)&&this.value>=this.max&&this.min<=this.max&&(this.setProperties({value:this.resetTime(this.max)},!0),this.changedArgs={value:this.value}),this.min<=this.max&&this.value&&this.value<=this.max&&this.value>=this.min?this.currentDate=new Date(this.value):this.min<=this.max&&!this.value&&this.currentDate>this.max?this.currentDate=new Date(this.max):this.currentDate<this.min&&(this.currentDate=new Date(this.min))},t.prototype.header=function(){var e={"aria-disabled":"false",role:"button"},t={"aria-disabled":"false",role:"button"},r={"aria-atomic":"true","aria-live":"assertive","aria-label":"title",role:"button"};this.headerEle=o.createElement("div",{className:"e-header"});var n=o.createElement("div",{className:"e-icon-container"});this.prevIcon=o.createElement("a",{className:"e-prev"}),this.prevIcon.classList.add("e-ripple-style"),o.attributes(this.prevIcon,e),this.nextIcon=o.createElement("a",{className:"e-next"}),this.nextIcon.classList.add("e-ripple-style"),o.attributes(this.nextIcon,t),this.hdrTitleEle=o.createElement("a",{className:"e-link e-title",attrs:{}}),o.attributes(this.hdrTitleEle,r),this.headerEle.appendChild(this.hdrTitleEle),this.prevIcon.appendChild(o.createElement("span",{className:"e-icon-prev e-icons"})),this.nextIcon.appendChild(o.createElement("span",{className:"e-icon-next e-icons"})),n.appendChild(this.prevIcon),n.appendChild(this.nextIcon),this.headerEle.appendChild(n),this.element.appendChild(this.headerEle)},t.prototype.content=function(){this.previousDate=this.value,this.contentEle=o.createElement("div",{className:"e-content"}),this.table=o.createElement("table",{attrs:{tabIndex:"0",role:"grid","aria-activedescendant":""}}),this.element.appendChild(this.contentEle),this.contentEle.appendChild(this.table),this.contentHdr(),this.contentBody()},t.prototype.getCultureValues=function(){var e,t=[];e="en"===this.locale||"en-US"===this.locale?l.getValue("days.stand-alone.abbreviated",i.getDefaultDateObject()):this.getCultureObjects(i.cldrData,""+this.locale);for(var r=0,n=Object.keys(e);r<n.length;r++){var a=n[r];t.push(l.getValue(a,e))}return t},t.prototype.contentHdr=function(){this.element.querySelectorAll(".e-content .e-week-header")[0]&&o.remove(this.element.querySelectorAll(".e-content .e-week-header")[0]);var e,t="";(this.firstDayOfWeek>6||this.firstDayOfWeek<0)&&this.setProperties({firstDayOfWeek:0},!0),this.theadEle=o.createElement("thead",{className:"e-week-header"}),this.weekNumber&&(t+='<th class="e-week-number"></th>'),e=this.shiftArray(this.getCultureValues().length>0&&this.getCultureValues(),this.firstDayOfWeek);for(var r=0;r<=6;r++)t+='<th class="">'+e[r]+"</th>";t="<tr>"+t+"</tr>",this.theadEle.innerHTML=t,this.table.appendChild(this.theadEle)},t.prototype.contentBody=function(){switch(this.element.querySelectorAll(".e-content tbody")[0]&&o.remove(this.element.querySelectorAll(".e-content tbody")[0]),this.start){case"year":this.renderYears();break;case"decade":this.renderDecades();break;default:this.renderMonths()}},t.prototype.wireEvents=function(){r.EventHandler.add(this.hdrTitleEle,"click",this.navTitle,this),this.keyboardModule=new n.KeyboardEvents(this.element,{eventName:"keydown",keyAction:this.keyActionHandle.bind(this),keyConfigs:this.keyConfigs})},t.prototype.keyActionHandle=function(e){this.effect="";var t=this.getViewNumber(this.currentView()),r=this.tbodyEle.querySelector("tr td.e-focused-date"),n=this.tbodyEle.querySelector("tr td.e-selected"),i=this.getViewNumber(this.depth),a=t===i&&this.getViewNumber(this.start)>=i;switch(e.action){case"moveLeft":this.KeyboardNavigate(-1,t),e.preventDefault();break;case"moveRight":this.KeyboardNavigate(1,t),e.preventDefault();break;case"moveUp":0===t?this.KeyboardNavigate(-7,t):this.KeyboardNavigate(-4,t),e.preventDefault();break;case"moveDown":0===t?this.KeyboardNavigate(7,t):this.KeyboardNavigate(4,t),e.preventDefault();break;case"select":if(!l.isNullOrUndefined(r)||!l.isNullOrUndefined(n))if(a){var s=new Date(parseInt(""+(r||n).id,0));this.selectDate(e,this.resetTime(s),r||n)}else this.contentClick(null,--t,r||n);break;case"controlUp":this.title(),e.preventDefault();break;case"controlDown":l.isNullOrUndefined(r)&&(l.isNullOrUndefined(n)||a)||this.contentClick(null,--t,r||n),e.preventDefault();break;case"home":this.currentDate=this.firstDay(this.currentDate),o.remove(this.tbodyEle),this.renderMonths(),e.preventDefault();break;case"end":this.currentDate=this.lastDay(this.currentDate),o.remove(this.tbodyEle),this.renderMonths(),e.preventDefault();break;case"pageUp":this.addMonths(this.currentDate,-1),this.navigateTo("month",this.currentDate),e.preventDefault();break;case"pageDown":this.addMonths(this.currentDate,1),this.navigateTo("month",this.currentDate),e.preventDefault();break;case"shiftPageUp":this.addYears(this.currentDate,-1),this.navigateTo("month",this.currentDate),e.preventDefault();break;case"shiftPageDown":this.addYears(this.currentDate,1),this.navigateTo("month",this.currentDate),e.preventDefault();break;case"controlHome":this.navigateTo("month",new Date(this.currentDate.getFullYear(),0,1)),e.preventDefault();break;case"controlEnd":this.navigateTo("month",new Date(this.currentDate.getFullYear(),11,31)),e.preventDefault()}},t.prototype.KeyboardNavigate=function(e,t){var r=new Date(this.currentDate);switch(t){case 2:this.addYears(this.currentDate,e),this.isMinMaxRange(this.currentDate)?(o.remove(this.tbodyEle),this.renderDecades()):this.currentDate=r;break;case 1:this.addMonths(this.currentDate,e),this.isMinMaxRange(this.currentDate)?(o.remove(this.tbodyEle),this.renderYears()):this.currentDate=r;break;case 0:this.addDay(this.currentDate,e),this.isMinMaxRange(this.currentDate)?(o.remove(this.tbodyEle),this.renderMonths()):this.currentDate=r}},t.prototype.preRender=function(){var e=this;this.changeHandler=function(t){e.triggerChange()},this.navigateHandler=function(t){e.triggerNavigate()}},t.prototype.renderMonths=function(){var e=[],t=this.resetTime(new Date(this.currentDate)),n=this.weekNumber?8:7,i=t.getMonth();this.titleUpdate(this.currentDate,"days");var a=t;for(t=new Date(a.getFullYear(),a.getMonth(),0,a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds());t.getDay()!==this.firstDayOfWeek;)this.setTime(t,-864e5);for(var s=0;s<42;++s){var l=o.createElement("td"),v=o.createElement("span");s%7==0&&this.weekNumber&&(v.textContent=""+this.getWeek(t),l.appendChild(v),o.addClass([l],"e-week-number"),e.push(l));var f=this.globalize.parseDate(this.globalize.formatDate(t,{skeleton:"full"}),{skeleton:"full"}),m=this.dayCell(t),y=this.globalize.formatDate(t,{type:"date",skeleton:"full"}),g=o.createElement("span");g.textContent=t.getDate().toString();var D=this.min>t||this.max<t;D?(o.addClass([m],h),o.addClass([m],c)):g.setAttribute("title",""+y),o.attributes(m,{"aria-label":""+y}),i!==t.getMonth()&&o.addClass([m],u),0!==t.getDay()&&6!==t.getDay()||o.addClass([m],"e-weekend"),this.renderDaycellArg={date:t,isDisabled:!1,element:g,isOutOfRange:D};var b=this.renderDaycellArg;this.renderDayCellEvent(b),this.renderDaycellArg.isDisabled&&!m.classList.contains(d)&&(o.addClass([m],h),o.addClass([m],c));var w=m.classList.contains(u),E=m.classList.contains(h);E||r.EventHandler.add(m,"click",this.clickHandler,this),b.isDisabled&&+this.value==+b.date&&this.setProperties({value:null},!0),w||E||!this.getDateVal(t)?this.currentDate.getDate()!==t.getDate()||w||E?(this.currentDate>=this.max&&parseInt(m.id,0)===+this.max&&!w&&!E&&o.addClass([m],p),this.currentDate<=this.min&&parseInt(m.id,0)===+this.min&&!w&&!E&&o.addClass([m],p)):o.addClass([m],p):o.addClass([m],d),this.resetTime(f).valueOf()===this.resetTime(new Date).valueOf()&&o.addClass([m],"e-today"),m.appendChild(this.renderDaycellArg.element),e.push(m),this.addDay(t,1)}o.setStyleAttribute(this.theadEle,{display:""}),this.renderTemplate(e,n,"e-month")},t.prototype.renderYears=function(){var e=[];o.setStyleAttribute(this.theadEle,{display:"none"});var t=l.isNullOrUndefined(this.value),n=new Date(this.currentDate),i=n.getMonth(),a=n.getFullYear(),s=n,c=s.getFullYear(),u=new Date(this.min).getFullYear(),v=new Date(this.min).getMonth(),f=new Date(this.max).getFullYear(),m=new Date(this.max).getMonth();s.setMonth(0),this.titleUpdate(this.currentDate,"months");this.min>s||this.max;s.setDate(1);for(var y=0;y<12;++y){var g=this.dayCell(s),D=o.createElement("span"),b=this.value&&this.value.getMonth()===s.getMonth(),w=this.value&&this.value.getFullYear()===a&&b;D.textContent=this.globalize.formatDate(s,{type:"date",skeleton:"MMM"}),this.min&&(c<u||y<v&&c===u)||this.max&&(c>f||y>m&&c>=f)?o.addClass([g],h):!t&&w?(o.addClass([g],d),this.ariaAttr(g)):s.getMonth()===i&&this.currentDate.getMonth()===i&&o.addClass([g],p),s.setMonth(s.getMonth()+1),g.classList.contains(h)||r.EventHandler.add(g,"click",this.clickHandler,this),g.appendChild(D),e.push(g)}this.renderTemplate(e,4,"e-year")},t.prototype.renderDecades=function(){var e=[];o.setStyleAttribute(this.theadEle,{display:"none"});var t=new Date(this.currentDate);t.setMonth(0),t.setDate(1);var n=t.getFullYear();this.hdrTitleEle.textContent=n-n%10+" - "+(n-n%10+9);for(var i=new Date(n-n%10-1,0,1),a=i.getFullYear(),s=0;s<12;++s){var c=a+s;t.setFullYear(c);var u=this.dayCell(t);o.attributes(u,{role:"gridcell"});var v=o.createElement("span");v.textContent=c.toString(),c<new Date(this.min).getFullYear()||c>new Date(this.max).getFullYear()?o.addClass([u],h):l.isNullOrUndefined(this.value)||t.getFullYear()!==this.value.getFullYear()?t.getFullYear()!==this.currentDate.getFullYear()||u.classList.contains(h)||o.addClass([u],p):(o.addClass([u],d),this.ariaAttr(u)),u.classList.contains(h)||r.EventHandler.add(u,"click",this.clickHandler,this),u.appendChild(v),e.push(u),o.setStyleAttribute(this.theadEle,{attrs:{display:"block"}})}this.renderTemplate(e,4,"e-decade")},t.prototype.dayCell=function(e){var t=this.globalize.parseDate(this.globalize.formatDate(e,{skeleton:"full"}),{skeleton:"full"}),r=this.resetTime(t).valueOf();return o.createElement("td",{attrs:{id:""+l.getUniqueID(""+r),"aria-selected":"false",role:"grid-cell"}})},t.prototype.firstDay=function(e){return new Date(e.getFullYear(),e.getMonth())},t.prototype.lastDay=function(e){var t=new Date(e.getFullYear(),e.getMonth()+1,0),r=Math.abs(t.getTimezoneOffset()-this.firstDay(e).getTimezoneOffset());return r&&t.setHours(this.firstDay(e).getHours()+r/60),t},t.prototype.renderTemplate=function(e,t,r){var n,i=this.getViewNumber(this.currentView());this.tbodyEle=o.createElement("tbody",{attrs:{role:"rowgroup"}}),this.table.appendChild(this.tbodyEle),o.removeClass([this.contentEle],["e-month","e-decade","e-year"]),o.addClass([this.contentEle],r);for(var a=t,s=0,l=0;l<e.length/t;++l){for(n=o.createElement("tr",{attrs:{role:"row"}}),s=0+s;s<a;s++)!e[s].classList.contains("e-week-number")&&e[s].children[0]&&o.addClass([e[s].children[0]],["e-link","e-ripple-style"]),n.appendChild(e[s]),!this.weekNumber&&6===s&&e[6].classList.contains(u)&&o.addClass([n],"e-month-hide"),this.weekNumber?41===s&&e[41].classList.contains(u)&&o.addClass([n],"e-month-hide"):35===s&&e[35].classList.contains(u)&&o.addClass([n],"e-month-hide");a+=t,s+=0,this.tbodyEle.appendChild(n)}this.table.querySelector("tbody").className=this.effect,this.iconHandler(),this.changedArgs={value:this.value},(i!==this.getViewNumber(this.currentView())||0===i&&i!==this.getViewNumber(this.currentView()))&&this.navigateHandler(),this.changeHandler(),o.addClass([this.headerEle],"e-"+this.currentView())},t.prototype.clickHandler=function(e){var t=e.currentTarget;e.preventDefault();var r=this.getViewNumber(this.currentView());t.classList.contains(u)?(this.value=this.getIdValue(e,null),this.contentClick(e,0,null)):r===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?this.contentClick(e,1,null):2===r?this.contentClick(e,1,null):t.classList.contains(u)||0!==r?this.contentClick(e,0,t):this.selectDate(e,this.getIdValue(e,null),null)},t.prototype.contentClick=function(e,t,r){var n=this.getViewNumber(this.currentView()),i=this.getIdValue(e,r);switch(t){case 0:n===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?(o.remove(this.tbodyEle),this.renderMonths()):(this.currentDate.setMonth(i.getMonth()),i.getMonth()>0&&this.currentDate.getMonth()!==i.getMonth()&&this.currentDate.setDate(0),this.currentDate.setFullYear(i.getFullYear()),this.effect="e-zoomin",o.remove(this.tbodyEle),this.renderMonths());break;case 1:n===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?this.selectDate(e,i,null):(this.currentDate.setFullYear(i.getFullYear()),this.effect="e-zoomin",o.remove(this.tbodyEle),this.renderYears())}},t.prototype.switchView=function(e){switch(e){case 0:o.remove(this.tbodyEle),this.renderMonths();break;case 1:o.remove(this.tbodyEle),this.renderYears();break;case 2:o.remove(this.tbodyEle),this.renderDecades()}},t.prototype.getModuleName=function(){return"calendar"},t.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},t.prototype.onPropertyChanged=function(e,t){for(var n=0,i=Object.keys(e);n<i.length;n++){switch(i[n]){case"value":isNaN(+this.value)&&this.setProperties({value:t.value},!0),this.validateDate(),this.minMaxUpdate(),this.setvalue();break;case"enableRtl":e.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl");break;case"weekNumber":case"firstDayOfWeek":this.contentHdr(),this.contentBody();break;case"min":case"max":this.setProperties({start:this.currentView()},!0),o.remove(this.tbodyEle),this.minMaxUpdate(),this.contentBody();break;case"locale":this.globalize=new r.Internationalization(this.locale),this.contentHdr(),this.contentBody()}}},t.prototype.setvalue=function(){this.tbodyEle.remove(),this.setProperties({start:this.currentView()},!0),this.contentBody()},t.prototype.titleUpdate=function(e,t){var n=new r.Internationalization(this.locale);switch(t){case"days":this.hdrTitleEle.textContent=n.formatDate(e,{type:"date",skeleton:"yMMMM"});break;case"months":this.hdrTitleEle.textContent=n.formatDate(e,{type:"date",skeleton:"y"})}},t.prototype.ariaAttr=function(e){e.setAttribute("aria-selected","true"),o.attributes(this.table,{"aria-activedescendant":""+e.getAttribute("id")})},t.prototype.iconHandler=function(){switch(new Date(this.currentDate).setDate(1),this.currentView()){case"month":this.prevIconHandler(this.compareMonth(new Date(this.currentDate),this.min)<1),this.nextIconHandler(this.compareMonth(new Date(this.currentDate),this.max)>-1);break;case"year":this.prevIconHandler(this.compareYear(new Date(this.currentDate),this.min)<1),this.nextIconHandler(this.compareYear(new Date(this.currentDate),this.max)>-1);break;case"decade":this.prevIconHandler(this.compareDecade(new Date(this.currentDate),this.min)<1),this.nextIconHandler(this.compareDecade(new Date(this.currentDate),this.max)>-1)}},t.prototype.destroy=function(){this.element.classList.remove("e-calendar"),r.EventHandler.remove(this.hdrTitleEle,"click",this.navTitle),this.prevIconHandler(!0),this.nextIconHandler(!0),this.keyboardModule.destroy(),e.prototype.destroy.call(this)},t.prototype.title=function(){var e=this.getViewNumber(this.currentView());this.effect="e-zoomin",this.switchView(++e)},t.prototype.getViewNumber=function(e){return"month"===e?0:"year"===e?1:2},t.prototype.navTitle=function(){this.title()},t.prototype.previous=function(){this.effect="";var e=this.getViewNumber(this.currentView());switch(this.currentView()){case"month":this.addMonths(this.currentDate,-1),this.switchView(e);break;case"year":this.addYears(this.currentDate,-1),this.switchView(e);break;case"decade":this.addYears(this.currentDate,-10),this.switchView(e)}},t.prototype.navPrev=function(){this.previous(),this.triggerNavigate()},t.prototype.next=function(){this.effect="";var e=this.getViewNumber(this.currentView());switch(this.currentView()){case"month":this.addMonths(this.currentDate,1),this.switchView(e);break;case"year":this.addYears(this.currentDate,1),this.switchView(e);break;case"decade":this.addYears(this.currentDate,10),this.switchView(e)}},t.prototype.navNext=function(){this.next(),this.triggerNavigate()},t.prototype.navigateTo=function(e,t){this.minMaxUpdate(),+t>=+this.min&&+t<=+this.max&&(this.currentDate=t),+t<=+this.min&&(this.currentDate=new Date(this.min)),+t>=+this.max&&(this.currentDate=new Date(this.max)),this.switchView(this.getViewNumber(e))},t.prototype.currentView=function(){return this.contentEle.classList.contains("e-year")?"year":this.contentEle.classList.contains("e-decade")?"decade":"month"},t.prototype.getDateVal=function(e){return!l.isNullOrUndefined(this.value)&&e.getDate()===this.value.getDate()&&e.getMonth()===this.value.getMonth()&&e.getFullYear()===this.value.getFullYear()},t.prototype.getCultureObjects=function(e,t){return l.getValue("main."+this.locale+".dates.calendars.gregorian.days.format.abbreviated",e)},t.prototype.getWeek=function(e){var t=new Date(e).valueOf(),r=new Date(e.getFullYear(),0,1).valueOf(),n=t-r;return Math.ceil((n/864e5+new Date(r).getDay()+1)/7)},t.prototype.setTime=function(e,t){var r=e.getTimezoneOffset(),n=new Date(e.getTime()+t),i=n.getTimezoneOffset()-r;e.setTime(n.getTime()+864e5*i)},t.prototype.addMonths=function(e,t){var r=e.getDate();e.setDate(1),e.setMonth(e.getMonth()+t),e.setDate(Math.min(r,this.getMaxDays(e)))},t.prototype.addYears=function(e,t){var r=e.getDate();e.setDate(1),e.setFullYear(e.getFullYear()+t),e.setDate(Math.min(r,this.getMaxDays(e)))},t.prototype.getIdValue=function(e,t){var r;r=e?e.currentTarget:t;var n=this.globalize.formatDate(new Date(parseInt(""+r.getAttribute("id"),0)),{skeleton:"full"});return this.resetTime(this.globalize.parseDate(n,{skeleton:"full",type:"date"}))},t.prototype.selectDate=function(e,t,r){var n=r||e.currentTarget;this.setProperties({value:new Date(t)},!0),this.currentDate=new Date(t),l.isNullOrUndefined(this.tbodyEle.querySelector("."+d))||o.removeClass([this.tbodyEle.querySelector("."+d)],d),l.isNullOrUndefined(this.tbodyEle.querySelector("."+p))||o.removeClass([this.tbodyEle.querySelector("."+p)],p),o.addClass([n],d),this.ariaAttr(n),this.setProperties({value:new Date(t)},!0),this.changedArgs={value:this.value},this.changeHandler()},t.prototype.prevIconHandler=function(e){e?(r.EventHandler.remove(this.prevIcon,"click",this.navPrev),o.addClass([this.prevIcon],""+h),o.addClass([this.prevIcon],""+c),this.prevIcon.setAttribute("aria-disabled","true")):(r.EventHandler.remove(this.prevIcon,"click",this.navPrev),r.EventHandler.add(this.prevIcon,"click",this.navPrev,this),o.removeClass([this.prevIcon],""+h),o.removeClass([this.prevIcon],""+c),this.prevIcon.setAttribute("aria-disabled","false"))},t.prototype.renderDayCellEvent=function(e){l.extend(this.renderDaycellArg,{name:"renderDayCell"}),this.trigger("renderDayCell",e)},t.prototype.navigatedEvent=function(){l.extend(this.navigatedArgs,{name:"navigated"}),this.trigger("navigated",this.navigatedArgs)},t.prototype.triggerNavigate=function(){this.navigatedArgs={view:this.currentView(),date:this.currentDate},this.navigatedEvent()},t.prototype.changeEvent=function(){this.trigger("change",this.changedArgs)},t.prototype.triggerChange=function(){l.extend(this.changedArgs,{name:"change"}),l.isNullOrUndefined(this.value)||this.setProperties({value:this.resetTime(this.value)},!0),+this.value!==Number.NaN&&+this.value!=+this.previousDate&&this.changeEvent(),this.previousDate=this.value},t.prototype.nextIconHandler=function(e){e?(r.EventHandler.remove(this.nextIcon,"click",this.navNext),o.addClass([this.nextIcon],h),o.addClass([this.nextIcon],c),this.nextIcon.setAttribute("aria-disabled","true")):(r.EventHandler.remove(this.nextIcon,"click",this.navNext),r.EventHandler.add(this.nextIcon,"click",this.navNext,this),o.removeClass([this.nextIcon],h),o.removeClass([this.nextIcon],c),this.nextIcon.setAttribute("aria-disabled","false"))},t.prototype.compare=function(e,t,r){var n,i,a=t.getFullYear();return n=a,i=0,r&&(a-=a%r,n=a-a%r+r-1),e.getFullYear()>n?i=1:e.getFullYear()<a&&(i=-1),i},t.prototype.isMinMaxRange=function(e){return+e>=+this.min&&+e<=+this.max},t.prototype.compareYear=function(e,t){return this.compare(e,t,0)},t.prototype.compareDecade=function(e,t){return this.compare(e,t,10)},t.prototype.shiftArray=function(e,t){return e.slice(t).concat(e.slice(0,t))},t.prototype.resetTime=function(e){return e.setHours(0,0,0,0),e},t.prototype.addDay=function(e,t){e.setDate(e.getDate()+t)},t.prototype.getMaxDays=function(e){var t,r,n=new Date(e);for(t=28,r=n.getMonth();n.getMonth()===r;)++t,n.setDate(t);return t-1},t.prototype.compareMonth=function(e,t){return e.getFullYear()>t.getFullYear()?1:e.getFullYear()<t.getFullYear()?-1:e.getMonth()===t.getMonth()?0:e.getMonth()>t.getMonth()?1:-1},t}(r.Component);s([r.Property(null)],v.prototype,"value",void 0),s([r.Property(new Date(1900,0,1))],v.prototype,"min",void 0),s([r.Property(new Date(2099,11,31))],v.prototype,"max",void 0),s([r.Property(0)],v.prototype,"firstDayOfWeek",void 0),s([r.Property("month")],v.prototype,"start",void 0),s([r.Property("month")],v.prototype,"depth",void 0),s([r.Property(!1)],v.prototype,"weekNumber",void 0),s([r.Event()],v.prototype,"created",void 0),s([r.Event()],v.prototype,"destroyed",void 0),s([r.Event()],v.prototype,"change",void 0),s([r.Event()],v.prototype,"navigated",void 0),s([r.Event()],v.prototype,"renderDayCell",void 0),v=s([n.NotifyPropertyChanges],v),t.Calendar=v,t.calendarBuilder=r.CreateBuilder(v)}.apply(t,n))&&(e.exports=i)},function(t,r){t.exports=e},function(e,t,r){var n,i;n=[r,t,r(5)],void 0!==(i=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r)}.apply(t,n))&&(e.exports=i)},function(e,t,r){var n,i;n=[r,t,r(6),r(7)],void 0!==(i=function(e,t,r,n){"use strict";function i(e,t){var r=document.createElement(e);return void 0===t?r:(r.innerHTML=t.innerHTML?t.innerHTML:"",void 0!==t.className&&(r.className=t.className),void 0!==t.id&&(r.id=t.id),void 0!==t.styles&&r.setAttribute("style",t.styles),void 0!==t.attrs&&p(r,t.attrs),r)}function a(e,t){for(var r=o(t),n=0,i=e;n<i.length;n++)for(var a=i[n],s=0,l=r;s<l.length;s++){var h=l[s];a.classList.contains(h)||a.classList.add(h)}return e}function s(e,t){for(var r=o(t),n=0,i=e;n<i.length;n++){var a=i[n];if(""!==a.className)for(var s=0,l=r;s<l.length;s++){var h=l[s];a.classList.remove(h)}}return e}function o(e){var t=[];return"string"==typeof e?t.push(e):t=e,t}function l(e){var t=e;return""===t.style.visibility&&t.offsetWidth>0}function h(e,t){for(var r=document.createDocumentFragment(),n=0,i=e;n<i.length;n++){var a=i[n];r.appendChild(a)}return t.insertBefore(r,t.firstElementChild),e}function c(e,t){for(var r=document.createDocumentFragment(),n=0,i=e;n<i.length;n++){var a=i[n];r.appendChild(a)}return t.appendChild(r),e}function u(e){return e.parentNode.removeChild(e)}function d(e){var t=e.parentNode;r.EventHandler.clearEvents(e),t.removeChild(e)}function p(e,t){for(var r=Object.keys(t),n=e,i=0,a=r;i<a.length;i++){var s=a[i];n.setAttribute(s,t[s])}return n}function v(e,t){return void 0===t&&(t=document),t.querySelector(e)}function f(e,t){return void 0===t&&(t=document),t.querySelectorAll(e)}function m(e,t){var r=e;if("function"==typeof r.closest)return r.closest(t);for(;r&&1===r.nodeType;){if(w(r,t))return r;r=r.parentNode}return null}function y(e){for(var t=[],r=Array.prototype.slice.call(e.parentNode.childNodes),n=0,i=r;n<i.length;n++){var a=i[n];a.nodeType===Node.ELEMENT_NODE&&e!==a&&t.push(a)}return t}function g(e,t,r){var i=e.getAttribute(t);return n.isNullOrUndefined(i)&&(e.setAttribute(t,r.toString()),i=r),i}function D(e,t){void 0!==t&&Object.keys(t).forEach(function(r){e.style[r]=t[r]})}function b(e,t,r){a([e],t),s([e],r)}function w(e,t){var r=e.matches||e.msMatchesSelector||e.webkitMatchesSelector;return r?r.call(e,t):-1!==[].indexOf.call(document.querySelectorAll(t),e)}Object.defineProperty(t,"__esModule",{value:!0}),t.createElement=i,t.addClass=a,t.removeClass=s,t.isVisible=l,t.prepend=h,t.append=c,t.detach=u,t.remove=d,t.attributes=p,t.select=v,t.selectAll=f,t.closest=m,t.siblings=y,t.getAttributeOrDefault=g,t.setStyleAttribute=D,t.classList=b,t.matches=w}.apply(t,n))&&(e.exports=i)},function(e,t,r){var n,i;n=[r,t,r(7)],void 0!==(i=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.addOrGetEventData=function(e){return"__eventList"in e?e.__eventList.events:(e.__eventList={},e.__eventList.events=[])},e.add=function(t,n,i,a,s){var o,l=e.addOrGetEventData(t);o=s?r.debounce(i,s):i,a&&(o=o.bind(a));for(var h=n.split(" "),c=0;c<h.length;c++)l.push({name:h[c],listener:i,debounce:o}),t.addEventListener(h[c],o)},e.remove=function(t,r,n){for(var i=e.addOrGetEventData(t),a=r.split(" "),s=0;s<a.length;s++)!function(e){var r,s=-1;i&&0!==i.length&&i.some(function(t,i){return t.name===a[e]&&t.listener.toString()===n.toString()&&(s=i,r=t.debounce,!0)}),-1!==s&&i.splice(s,1),t.removeEventListener(a[e],r)}(s)},e.clearEvents=function(t){var n,i;n=e.addOrGetEventData(t),i=r.extend([],i,n);for(var a=0;a<i.length;a++)t.removeEventListener(i[a].name,i[a].debounce),n.shift()},e.trigger=function(t,r,n){for(var i=e.addOrGetEventData(t),a=0,s=i;a<s.length;a++){var o=s[a];o.name===r&&o.debounce.call(this,n)}},e}();t.EventHandler=n}.apply(t,n))&&(e.exports=i)},function(e,t,r){var n,i;n=[r,t],void 0!==(i=function(e,t){"use strict";function r(e,t){var r=t;return r.unshift(void 0),new(Function.prototype.bind.apply(e,r))}function n(e){var t,r=new Uint16Array(5);(window.msCrypto||window.crypto).getRandomValues(r);var n="ej2"+x(r),i=function(r){r.source===window&&"string"==typeof r.data&&r.data.length<=32&&r.data===n&&(e(),t())};return window.addEventListener("message",i,!1),window.postMessage(n,"*"),t=function(){window.removeEventListener("message",i)}}function i(e,t){for(var r=t,n=e.split("."),i=0;i<n.length&&!d(r);i++)r=r[n[i]];return r}function a(e,t,r){var n,i,a=e.split("."),s=r||{},o=s,l=a.length;for(n=0;n<l;n++)i=a[n],n+1===l?o[i]=void 0===t?{}:t:u(o[i])&&(o[i]={}),o=o[i];return s}function s(e,t){delete e[t]}function o(e){var t={};return!u(e)&&e.constructor===t.constructor}function l(e,t){return e[t]}function h(e,t){if(!u(t))for(var r=e,n=t,i=Object.keys(t),a=0,s=i;a<s.length;a++){var o=s[a];r[o]=n[o]}}function c(e,t,r,n){var i=e||{},a=arguments.length;n&&(a-=1);for(var s=arguments,l=1;l<a;l++)!function(e){if(!s[e])return"continue";var t=s[e];Object.keys(t).forEach(function(e){var r,a=i[e],s=t[e];n&&o(s)?(r=o(a)?a:{},i[e]=c({},r,s,!0)):i[e]=s})}(l);return i}function u(e){return void 0===e||null===e}function d(e){return void 0===e}function p(e){return e+"_"+C++}function v(e,t){var r,n=this;return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=i[0],o=function(){return r=null,e.call(n,s)};clearTimeout(r),r=setTimeout(o,t)}}function f(e){for(var t=[],r=Object.keys(e),n=0,i=r;n<i.length;n++){var a=i[n];t.push(encodeURIComponent(a)+"="+encodeURIComponent(""+e[a]))}return t.join("&")}function m(e){var t=Object.prototype.toString;return"[object Array]"===t.call(e)&&"[object Object]"===t.call(e[0])}function y(e,t){var r=e;return r===t||!(r===document||!r)&&y(r.parentNode,t)}function g(e){try{throw new Error(e)}catch(e){throw e.message+"\n"+e.stack}}function D(e,t){var r=document.createElement("div"),n=[].slice.call(document.getElementsByTagName("head")[0].querySelectorAll("link, style")),i="";u(t)&&(t=window.open("","print","height=452,width=1024,tabbar=no")),r.appendChild(e.cloneNode(!0));for(var a=0,s=n.length;a<s;a++)i+=n[a].outerHTML;t.document.write("<!DOCTYPE html> <html><head>"+i+"</head><body>"+r.innerHTML+"<script> (function() { window.ready = true; })(); <\/script></body></html>"),t.document.close(),t.focus();var o=setInterval(function(){t.ready&&(t.print(),t.close(),clearInterval(o))},500);return t}function b(e){var t=e+"";return"auto"===t||-1!==t.indexOf("%")||-1!==t.indexOf("px")?t:t+"px"}function w(e,t){var r="string"==typeof e?document.querySelector(e):e;if(r[k])for(var n=0,i=r[k];n<i.length;n++){var a=i[n];if(a instanceof t)return a}return null}function E(e,t){var r="string"==typeof e?document.querySelector(e):e;r[k]?r[k].push(t):r[k]=[t]}function x(e){for(var t="",r=0;r<5;r++)t+=(r?",":"")+e[r];return t}Object.defineProperty(t,"__esModule",{value:!0});var k="ej2_instances",C=0;t.createInstance=r,t.setImmediate=n,t.getValue=i,t.setValue=a,t.deleteObject=s,t.isObject=o,t.getEnumValue=l,t.merge=h,t.extend=c,t.isNullOrUndefined=u,t.isUndefined=d,t.getUniqueID=p,t.debounce=v,t.queryParams=f,t.isObjectArray=m,t.compareElementParent=y,t.throwError=g,t.print=D,t.formatUnit=b,t.getInstance=w,t.addInstance=E}.apply(t,n))&&(e.exports=i)},function(e,t,r){var n,i;n=[r,t,r(7)],void 0!==(i=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r)}.apply(t,n))&&(e.exports=i)}])});
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@syncfusion/ej2-base"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-base"],t);else{var r=t("object"==typeof exports?require("@syncfusion/ej2-base"):e["@syncfusion/ej2-base"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){var n,i;n=[r,t,r(1)],void 0!==(i=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r)}.apply(t,n))&&(e.exports=i)},function(e,t,r){var n,i;n=[r,t,r(2)],void 0!==(i=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r)}.apply(t,n))&&(e.exports=i)},function(e,t,r){var n,i,a=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),s=this&&this.__decorate||function(e,t,r,n){var i,a=arguments.length,s=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,r,s):i(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};n=[r,t,r(3),r(3),r(3),r(4),r(8)],void 0!==(i=function(e,t,r,n,i,o,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h="e-disabled",c="e-overlay",u="e-other-month",d="e-selected",p="e-focused-date",v=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.effect="",n.keyConfigs={controlUp:"ctrl+38",controlDown:"ctrl+40",moveDown:"downarrow",moveUp:"uparrow",moveLeft:"leftarrow",moveRight:"rightarrow",select:"enter",home:"home",end:"end",pageUp:"pageup",pageDown:"pagedown",shiftPageUp:"shift+pageup",shiftPageDown:"shift+pagedown",controlHome:"ctrl+home",controlEnd:"ctrl+end"},n}return a(t,e),t.prototype.render=function(){this.globalize=new r.Internationalization(this.locale),this.element.classList.add("e-calendar"),this.enableRtl&&this.element.classList.add("e-rtl"),o.attributes(this.element,{"data-role":"calendar"}),this.processDate(),this.header(),this.content(),this.wireEvents()},t.prototype.processDate=function(){this.validateDate(),this.minMaxUpdate()},t.prototype.validateDate=function(){this.setProperties({value:new Date(""+this.value)},!0),this.currentDate=this.currentDate?this.currentDate:this.resetTime(new Date),!l.isNullOrUndefined(this.value)&&this.min<=this.max&&this.value>=this.min&&this.value<=this.max&&(this.currentDate=this.resetTime(new Date(""+this.value))),isNaN(+this.value)&&this.setProperties({value:null},!0),this.min<=this.max||(this.setProperties({min:this.min},!0),this.setProperties({max:new Date(2099,11,31)},!0))},t.prototype.minMaxUpdate=function(){this.min=l.isNullOrUndefined(this.min)||!+this.min?this.min=new Date(1900,0,1):this.min,this.max=l.isNullOrUndefined(this.max)||!+this.max?this.max=new Date(2099,11,31):this.max,!l.isNullOrUndefined(this.value)&&this.value<=this.min&&this.min<=this.max?(this.setProperties({value:this.resetTime(this.min)},!0),this.changedArgs={value:this.value}):!l.isNullOrUndefined(this.value)&&this.value>=this.max&&this.min<=this.max&&(this.setProperties({value:this.resetTime(this.max)},!0),this.changedArgs={value:this.value}),this.min<=this.max&&this.value&&this.value<=this.max&&this.value>=this.min?this.currentDate=new Date(""+this.value):this.min<=this.max&&!this.value&&this.currentDate>this.max?this.currentDate=new Date(""+this.max):this.currentDate<this.min&&(this.currentDate=new Date(""+this.min))},t.prototype.header=function(){var e={"aria-disabled":"false",role:"button","aria-label":"previous month"},t={"aria-disabled":"false",role:"button","aria-label":"next month"},r={"aria-atomic":"true","aria-live":"assertive","aria-label":"title",role:"button"};this.headerEle=o.createElement("div",{className:"e-header"});var n=o.createElement("div",{className:"e-icon-container"});this.prevIcon=o.createElement("a",{className:"e-prev"}),this.prevIcon.classList.add("e-ripple-style"),o.attributes(this.prevIcon,e),this.nextIcon=o.createElement("a",{className:"e-next"}),this.nextIcon.classList.add("e-ripple-style"),o.attributes(this.nextIcon,t),this.hdrTitleEle=o.createElement("a",{className:"e-day e-title",attrs:{}}),o.attributes(this.hdrTitleEle,r),this.headerEle.appendChild(this.hdrTitleEle),this.prevIcon.appendChild(o.createElement("span",{className:"e-icon-prev e-icons"})),this.nextIcon.appendChild(o.createElement("span",{className:"e-icon-next e-icons"})),n.appendChild(this.prevIcon),n.appendChild(this.nextIcon),this.headerEle.appendChild(n),this.element.appendChild(this.headerEle)},t.prototype.content=function(){this.previousDate=this.value,this.contentEle=o.createElement("div",{className:"e-content"}),this.table=o.createElement("table",{attrs:{tabIndex:"0",role:"grid","aria-activedescendant":""}}),this.element.appendChild(this.contentEle),this.contentEle.appendChild(this.table),this.contentHdr(),this.contentBody()},t.prototype.getCultureValues=function(){var e,t=[];e="en"===this.locale||"en-US"===this.locale?l.getValue("days.stand-alone.short",i.getDefaultDateObject()):this.getCultureObjects(i.cldrData,""+this.locale);for(var r=0,n=Object.keys(e);r<n.length;r++){var a=n[r];t.push(l.getValue(a,e))}return t},t.prototype.contentHdr=function(){this.element.querySelectorAll(".e-content .e-week-header")[0]&&o.remove(this.element.querySelectorAll(".e-content .e-week-header")[0]);var e,t="";(this.firstDayOfWeek>6||this.firstDayOfWeek<0)&&this.setProperties({firstDayOfWeek:0},!0),this.theadEle=o.createElement("thead",{className:"e-week-header"}),this.weekNumber&&(t+='<th class="e-week-number"></th>'),e=this.shiftArray(this.getCultureValues().length>0&&this.getCultureValues(),this.firstDayOfWeek);for(var r=0;r<=6;r++)t+='<th class="">'+e[r]+"</th>";t="<tr>"+t+"</tr>",this.theadEle.innerHTML=t,this.table.appendChild(this.theadEle)},t.prototype.contentBody=function(){switch(this.element.querySelectorAll(".e-content tbody")[0]&&o.remove(this.element.querySelectorAll(".e-content tbody")[0]),this.start){case"year":this.renderYears();break;case"decade":this.renderDecades();break;default:this.renderMonths()}},t.prototype.wireEvents=function(){r.EventHandler.add(this.hdrTitleEle,"click",this.navTitle,this),this.keyboardModule=new n.KeyboardEvents(this.element,{eventName:"keydown",keyAction:this.keyActionHandle.bind(this),keyConfigs:this.keyConfigs})},t.prototype.keyActionHandle=function(e){var t=this.getViewNumber(this.currentView()),r=this.tbodyEle.querySelector("tr td.e-focused-date"),n=this.tbodyEle.querySelector("tr td.e-selected"),i=this.getViewNumber(this.depth),a=t===i&&this.getViewNumber(this.start)>=i;switch(this.effect="",e.action){case"moveLeft":this.KeyboardNavigate(-1,t),e.preventDefault();break;case"moveRight":this.KeyboardNavigate(1,t),e.preventDefault();break;case"moveUp":0===t?this.KeyboardNavigate(-7,t):this.KeyboardNavigate(-4,t),e.preventDefault();break;case"moveDown":0===t?this.KeyboardNavigate(7,t):this.KeyboardNavigate(4,t),e.preventDefault();break;case"select":if(!l.isNullOrUndefined(r)||!l.isNullOrUndefined(n))if(a){var s=new Date(parseInt(""+(r||n).id,0));this.selectDate(e,this.resetTime(s),r||n)}else this.contentClick(null,--t,r||n);break;case"controlUp":this.title(),e.preventDefault();break;case"controlDown":l.isNullOrUndefined(r)&&(l.isNullOrUndefined(n)||a)||this.contentClick(null,--t,r||n),e.preventDefault();break;case"home":this.currentDate=this.firstDay(this.currentDate),o.remove(this.tbodyEle),this.renderMonths(),e.preventDefault();break;case"end":this.currentDate=this.lastDay(this.currentDate),o.remove(this.tbodyEle),this.renderMonths(),e.preventDefault();break;case"pageUp":this.addMonths(this.currentDate,-1),this.navigateTo("month",this.currentDate),e.preventDefault();break;case"pageDown":this.addMonths(this.currentDate,1),this.navigateTo("month",this.currentDate),e.preventDefault();break;case"shiftPageUp":this.addYears(this.currentDate,-1),this.navigateTo("month",this.currentDate),e.preventDefault();break;case"shiftPageDown":this.addYears(this.currentDate,1),this.navigateTo("month",this.currentDate),e.preventDefault();break;case"controlHome":this.navigateTo("month",new Date(this.currentDate.getFullYear(),0,1)),e.preventDefault();break;case"controlEnd":this.navigateTo("month",new Date(this.currentDate.getFullYear(),11,31)),e.preventDefault()}},t.prototype.KeyboardNavigate=function(e,t){var r=new Date(""+this.currentDate);switch(t){case 2:this.addYears(this.currentDate,e),this.isMinMaxRange(this.currentDate)?(o.remove(this.tbodyEle),this.renderDecades()):this.currentDate=r;break;case 1:this.addMonths(this.currentDate,e),this.isMinMaxRange(this.currentDate)?(o.remove(this.tbodyEle),this.renderYears()):this.currentDate=r;break;case 0:this.addDay(this.currentDate,e),this.isMinMaxRange(this.currentDate)?(o.remove(this.tbodyEle),this.renderMonths()):this.currentDate=r}},t.prototype.preRender=function(){var e=this;this.changeHandler=function(t){e.triggerChange()},this.navigateHandler=function(t){e.triggerNavigate()}},t.prototype.renderMonths=function(){var e=[],t=this.resetTime(new Date(""+this.currentDate)),n=this.weekNumber?8:7,i=t.getMonth();this.titleUpdate(this.currentDate,"days");var a=t;for(t=new Date(a.getFullYear(),a.getMonth(),0,a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds());t.getDay()!==this.firstDayOfWeek;)this.setTime(t,-864e5);for(var s=0;s<42;++s){var l=o.createElement("td"),v=o.createElement("span");s%7==0&&this.weekNumber&&(v.textContent=""+this.getWeek(t),l.appendChild(v),o.addClass([l],"e-week-number"),e.push(l));var f=this.globalize.parseDate(this.globalize.formatDate(t,{skeleton:"full"}),{skeleton:"full"}),m=this.dayCell(t),g=this.globalize.formatDate(t,{type:"date",skeleton:"full"}),y=o.createElement("span");y.textContent=t.getDate().toString();var D=this.min>t||this.max<t;D?(o.addClass([m],h),o.addClass([m],c)):y.setAttribute("title",""+g),i!==t.getMonth()&&o.addClass([m],u),0!==t.getDay()&&6!==t.getDay()||o.addClass([m],"e-weekend"),this.renderDaycellArg={date:t,isDisabled:!1,element:y,isOutOfRange:D};var b=this.renderDaycellArg;this.renderDayCellEvent(b),b.isDisabled&&this.value&&+this.resetTime(this.value)==+b.date&&this.setProperties({value:null},!0),this.renderDaycellArg.isDisabled&&!m.classList.contains(d)&&(o.addClass([m],h),o.addClass([m],c));var w=m.classList.contains(u),E=m.classList.contains(h);E||r.EventHandler.add(m,"click",this.clickHandler,this),b.isDisabled&&+this.value==+b.date&&this.setProperties({value:null},!0),w||E||!this.getDateVal(t)?this.currentDate.getDate()!==t.getDate()||w||E?(this.currentDate>=this.max&&parseInt(m.id,0)===+this.max&&!w&&!E&&o.addClass([m],p),this.currentDate<=this.min&&parseInt(m.id,0)===+this.min&&!w&&!E&&o.addClass([m],p)):o.addClass([m],p):o.addClass([m],d),this.resetTime(f).valueOf()===this.resetTime(new Date).valueOf()&&o.addClass([m],"e-today"),m.appendChild(this.renderDaycellArg.element),e.push(m),this.addDay(t,1)}this.contentHdr(),this.renderTemplate(e,n,"e-month")},t.prototype.renderYears=function(){this.removeTheadEle();var e=[],t=l.isNullOrUndefined(this.value),n=new Date(""+this.currentDate),i=n.getMonth(),a=n.getFullYear(),s=n,c=s.getFullYear(),u=new Date(""+this.min).getFullYear(),v=new Date(""+this.min).getMonth(),f=new Date(""+this.max).getFullYear(),m=new Date(""+this.max).getMonth();s.setMonth(0),this.titleUpdate(this.currentDate,"months");this.min>s||this.max;s.setDate(1);for(var g=0;g<12;++g){var y=this.dayCell(s),D=o.createElement("span"),b=this.value&&this.value.getMonth()===s.getMonth(),w=this.value&&this.value.getFullYear()===a&&b;D.textContent=this.globalize.formatDate(s,{type:"date",skeleton:"MMM"}),this.min&&(c<u||g<v&&c===u)||this.max&&(c>f||g>m&&c>=f)?o.addClass([y],h):!t&&w?o.addClass([y],d):s.getMonth()===i&&this.currentDate.getMonth()===i&&o.addClass([y],p),s.setDate(1),s.setMonth(s.getMonth()+1),y.classList.contains(h)||r.EventHandler.add(y,"click",this.clickHandler,this),y.appendChild(D),e.push(y)}this.renderTemplate(e,4,"e-year")},t.prototype.renderDecades=function(){this.removeTheadEle();var e=[],t=new Date(""+this.currentDate);t.setMonth(0),t.setDate(1);var n=t.getFullYear();this.hdrTitleEle.textContent=n-n%10+" - "+(n-n%10+9);for(var i=new Date(n-n%10-1,0,1),a=i.getFullYear(),s=0;s<12;++s){var c=a+s;t.setFullYear(c);var u=this.dayCell(t);o.attributes(u,{role:"gridcell"});var v=o.createElement("span");v.textContent=c.toString(),c<new Date(""+this.min).getFullYear()||c>new Date(""+this.max).getFullYear()?o.addClass([u],h):l.isNullOrUndefined(this.value)||t.getFullYear()!==this.value.getFullYear()?t.getFullYear()!==this.currentDate.getFullYear()||u.classList.contains(h)||o.addClass([u],p):o.addClass([u],d),u.classList.contains(h)||r.EventHandler.add(u,"click",this.clickHandler,this),u.appendChild(v),e.push(u)}this.renderTemplate(e,4,"e-decade")},t.prototype.dayCell=function(e){var t=this.globalize.parseDate(this.globalize.formatDate(e,{skeleton:"full"}),{skeleton:"full"}),r=this.resetTime(t).valueOf();return o.createElement("td",{attrs:{id:""+l.getUniqueID(""+r),"aria-selected":"false",role:"gridcell"}})},t.prototype.firstDay=function(e){return new Date(e.getFullYear(),e.getMonth())},t.prototype.lastDay=function(e){var t=new Date(e.getFullYear(),e.getMonth()+1,0),r=Math.abs(t.getTimezoneOffset()-this.firstDay(e).getTimezoneOffset());return r&&t.setHours(this.firstDay(e).getHours()+r/60),t},t.prototype.removeTheadEle=function(){this.element.querySelectorAll(".e-content table thead")[0]&&o.remove(this.theadEle)},t.prototype.renderTemplate=function(e,t,r){var n,i=this.getViewNumber(this.currentView());this.tbodyEle=o.createElement("tbody"),this.table.appendChild(this.tbodyEle),o.removeClass([this.contentEle,this.headerEle],["e-month","e-decade","e-year"]),o.addClass([this.contentEle,this.headerEle],[r]);for(var a=t,s=0,l=0;l<e.length/t;++l){for(n=o.createElement("tr",{attrs:{role:"row"}}),s=0+s;s<a;s++)!e[s].classList.contains("e-week-number")&&e[s].children[0]&&o.addClass([e[s].children[0]],["e-day","e-ripple-style"]),n.appendChild(e[s]),!this.weekNumber&&6===s&&e[6].classList.contains(u)&&o.addClass([n],"e-month-hide"),this.weekNumber?41===s&&e[41].classList.contains(u)&&o.addClass([n],"e-month-hide"):35===s&&e[35].classList.contains(u)&&o.addClass([n],"e-month-hide");a+=t,s+=0,this.tbodyEle.appendChild(n)}this.table.querySelector("tbody").className=this.effect,this.iconHandler(),this.changedArgs={value:this.value},(i!==this.getViewNumber(this.currentView())||0===i&&i!==this.getViewNumber(this.currentView()))&&this.navigateHandler(),this.ariaActivedescendent(),this.changeHandler()},t.prototype.clickHandler=function(e){var t=e.currentTarget;e.preventDefault();var r=this.getViewNumber(this.currentView());t.classList.contains(u)?(this.value=this.getIdValue(e,null),this.contentClick(e,0,null)):r===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?this.contentClick(e,1,null):2===r?this.contentClick(e,1,null):t.classList.contains(u)||0!==r?this.contentClick(e,0,t):this.selectDate(e,this.getIdValue(e,null),null)},t.prototype.contentClick=function(e,t,r){var n=this.getViewNumber(this.currentView()),i=this.getIdValue(e,r);switch(t){case 0:n===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?(o.remove(this.tbodyEle),this.currentDate=i,this.effect="e-zoomin",this.renderMonths()):(this.currentDate.setMonth(i.getMonth()),i.getMonth()>0&&this.currentDate.getMonth()!==i.getMonth()&&this.currentDate.setDate(0),this.currentDate.setFullYear(i.getFullYear()),this.effect="e-zoomin",o.remove(this.tbodyEle),this.renderMonths());break;case 1:n===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?this.selectDate(e,i,null):(this.currentDate.setFullYear(i.getFullYear()),this.effect="e-zoomin",o.remove(this.tbodyEle),this.renderYears())}},t.prototype.switchView=function(e){switch(e){case 0:o.remove(this.tbodyEle),this.renderMonths();break;case 1:o.remove(this.tbodyEle),this.renderYears();break;case 2:o.remove(this.tbodyEle),this.renderDecades()}},t.prototype.getModuleName=function(){return"calendar"},t.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},t.prototype.onPropertyChanged=function(e,t){this.effect="";for(var n=0,i=Object.keys(e);n<i.length;n++){switch(i[n]){case"value":isNaN(+this.value)&&this.setProperties({value:t.value},!0),this.validateDate(),this.minMaxUpdate(),this.setvalue();break;case"enableRtl":e.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl");break;case"weekNumber":case"firstDayOfWeek":this.contentHdr(),this.contentBody();break;case"min":case"max":this.setProperties({start:this.currentView()},!0),o.remove(this.tbodyEle),this.minMaxUpdate(),this.contentBody();break;case"locale":this.globalize=new r.Internationalization(this.locale),this.contentHdr(),this.contentBody()}}},t.prototype.setvalue=function(){this.tbodyEle.remove(),this.setProperties({start:this.currentView()},!0),this.contentBody()},t.prototype.titleUpdate=function(e,t){var n=new r.Internationalization(this.locale);switch(t){case"days":this.hdrTitleEle.textContent=n.formatDate(e,{type:"date",skeleton:"yMMMM"});break;case"months":this.hdrTitleEle.textContent=n.formatDate(e,{type:"date",skeleton:"y"})}},t.prototype.ariaActivedescendent=function(){var e=this.tbodyEle.querySelector("tr td.e-focused-date"),t=this.tbodyEle.querySelector("tr td.e-selected"),r=this.globalize.formatDate(this.currentDate,{type:"date",skeleton:"full"});(t||e)&&((e||t).setAttribute("aria-selected","true"),(e||t).setAttribute("aria-label","The current focused date is "+r),o.attributes(this.table,{"aria-activedescendant":""+(e||t).getAttribute("id")}))},t.prototype.iconHandler=function(){switch(new Date(""+this.currentDate).setDate(1),this.currentView()){case"month":this.prevIconHandler(this.compareMonth(new Date(""+this.currentDate),this.min)<1),this.nextIconHandler(this.compareMonth(new Date(""+this.currentDate),this.max)>-1);break;case"year":this.prevIconHandler(this.compareYear(new Date(""+this.currentDate),this.min)<1),this.nextIconHandler(this.compareYear(new Date(""+this.currentDate),this.max)>-1);break;case"decade":this.prevIconHandler(this.compareDecade(new Date(""+this.currentDate),this.min)<1),this.nextIconHandler(this.compareDecade(new Date(""+this.currentDate),this.max)>-1)}},t.prototype.destroy=function(){this.element.classList.remove("e-calendar"),r.EventHandler.remove(this.hdrTitleEle,"click",this.navTitle),this.prevIconHandler(!0),this.nextIconHandler(!0),this.keyboardModule.destroy(),this.element.innerHTML="",e.prototype.destroy.call(this)},t.prototype.title=function(){var e=this.getViewNumber(this.currentView());this.effect="e-zoomin",this.switchView(++e)},t.prototype.getViewNumber=function(e){return"month"===e?0:"year"===e?1:2},t.prototype.navTitle=function(){this.title()},t.prototype.previous=function(){this.effect="";var e=this.getViewNumber(this.currentView());switch(this.currentView()){case"month":this.addMonths(this.currentDate,-1),this.switchView(e);break;case"year":this.addYears(this.currentDate,-1),this.switchView(e);break;case"decade":this.addYears(this.currentDate,-10),this.switchView(e)}},t.prototype.navPrev=function(){this.previous(),this.triggerNavigate()},t.prototype.next=function(){this.effect="";var e=this.getViewNumber(this.currentView());switch(this.currentView()){case"month":this.addMonths(this.currentDate,1),this.switchView(e);break;case"year":this.addYears(this.currentDate,1),this.switchView(e);break;case"decade":this.addYears(this.currentDate,10),this.switchView(e)}},t.prototype.navNext=function(){this.next(),this.triggerNavigate()},t.prototype.navigateTo=function(e,t){this.minMaxUpdate(),+t>=+this.min&&+t<=+this.max&&(this.currentDate=t),+t<=+this.min&&(this.currentDate=new Date(""+this.min)),+t>=+this.max&&(this.currentDate=new Date(""+this.max)),this.switchView(this.getViewNumber(e))},t.prototype.currentView=function(){return this.contentEle.classList.contains("e-year")?"year":this.contentEle.classList.contains("e-decade")?"decade":"month"},t.prototype.getDateVal=function(e){return!l.isNullOrUndefined(this.value)&&e.getDate()===this.value.getDate()&&e.getMonth()===this.value.getMonth()&&e.getFullYear()===this.value.getFullYear()},t.prototype.getCultureObjects=function(e,t){return l.getValue("main."+this.locale+".dates.calendars.gregorian.days.format.short",e)},t.prototype.getWeek=function(e){var t=new Date(""+e).valueOf(),r=new Date(e.getFullYear(),0,1).valueOf(),n=t-r;return Math.ceil((n/864e5+new Date(r).getDay()+1)/7)},t.prototype.setTime=function(e,t){var r=e.getTimezoneOffset(),n=new Date(e.getTime()+t),i=n.getTimezoneOffset()-r;e.setTime(n.getTime()+864e5*i)},t.prototype.addMonths=function(e,t){var r=e.getDate();e.setDate(1),e.setMonth(e.getMonth()+t),e.setDate(Math.min(r,this.getMaxDays(e)))},t.prototype.addYears=function(e,t){var r=e.getDate();e.setDate(1),e.setFullYear(e.getFullYear()+t),e.setDate(Math.min(r,this.getMaxDays(e)))},t.prototype.getIdValue=function(e,t){var r;r=e?e.currentTarget:t;var n=this.globalize.formatDate(new Date(parseInt(""+r.getAttribute("id"),0)),{skeleton:"full"});return this.resetTime(this.globalize.parseDate(n,{skeleton:"full",type:"date"}))},t.prototype.selectDate=function(e,t,r){var n=r||e.currentTarget;"decade"===this.currentView()?this.setDateDecade(this.currentDate,t.getFullYear()):"year"===this.currentView()?this.setDateYear(this.currentDate,t):(this.setProperties({value:new Date(""+t)},!0),this.currentDate=new Date(""+t)),l.isNullOrUndefined(this.tbodyEle.querySelector("."+d))||o.removeClass([this.tbodyEle.querySelector("."+d)],d),l.isNullOrUndefined(this.tbodyEle.querySelector("."+p))||o.removeClass([this.tbodyEle.querySelector("."+p)],p),o.addClass([n],d),this.changedArgs={value:this.value},this.changeHandler(),this.ariaActivedescendent()},t.prototype.prevIconHandler=function(e){e?(r.EventHandler.remove(this.prevIcon,"click",this.navPrev),o.addClass([this.prevIcon],""+h),o.addClass([this.prevIcon],""+c),this.prevIcon.setAttribute("aria-disabled","true")):(r.EventHandler.remove(this.prevIcon,"click",this.navPrev),r.EventHandler.add(this.prevIcon,"click",this.navPrev,this),o.removeClass([this.prevIcon],""+h),o.removeClass([this.prevIcon],""+c),this.prevIcon.setAttribute("aria-disabled","false"))},t.prototype.renderDayCellEvent=function(e){l.extend(this.renderDaycellArg,{name:"renderDayCell"}),this.trigger("renderDayCell",e)},t.prototype.navigatedEvent=function(){l.extend(this.navigatedArgs,{name:"navigated"}),this.trigger("navigated",this.navigatedArgs)},t.prototype.triggerNavigate=function(){this.navigatedArgs={view:this.currentView(),date:this.currentDate},this.navigatedEvent()},t.prototype.changeEvent=function(){this.trigger("change",this.changedArgs)},t.prototype.triggerChange=function(){l.extend(this.changedArgs,{name:"change"}),l.isNullOrUndefined(this.value)||this.setProperties({value:this.resetTime(this.value)},!0),+this.value!==Number.NaN&&+this.value!=+this.previousDate&&this.changeEvent(),this.previousDate=this.value},t.prototype.nextIconHandler=function(e){e?(r.EventHandler.remove(this.nextIcon,"click",this.navNext),o.addClass([this.nextIcon],h),o.addClass([this.nextIcon],c),this.nextIcon.setAttribute("aria-disabled","true")):(r.EventHandler.remove(this.nextIcon,"click",this.navNext),r.EventHandler.add(this.nextIcon,"click",this.navNext,this),o.removeClass([this.nextIcon],h),o.removeClass([this.nextIcon],c),this.nextIcon.setAttribute("aria-disabled","false"))},t.prototype.compare=function(e,t,r){var n,i,a=t.getFullYear();return n=a,i=0,r&&(a-=a%r,n=a-a%r+r-1),e.getFullYear()>n?i=1:e.getFullYear()<a&&(i=-1),i},t.prototype.isMinMaxRange=function(e){return+e>=+this.min&&+e<=+this.max},t.prototype.compareYear=function(e,t){return this.compare(e,t,0)},t.prototype.compareDecade=function(e,t){return this.compare(e,t,10)},t.prototype.shiftArray=function(e,t){return e.slice(t).concat(e.slice(0,t))},t.prototype.resetTime=function(e){return e.setHours(0,0,0,0),e},t.prototype.addDay=function(e,t){e.setDate(e.getDate()+t)},t.prototype.getMaxDays=function(e){var t,r,n=new Date(""+e);for(t=28,r=n.getMonth();n.getMonth()===r;)++t,n.setDate(t);return t-1},t.prototype.setDateDecade=function(e,t){e.setFullYear(t),this.setProperties({value:new Date(""+e)},!0)},t.prototype.setDateYear=function(e,t){e.setFullYear(t.getFullYear(),t.getMonth(),e.getDate()),t.getMonth()!==e.getMonth()&&e.setDate(0),this.setProperties({value:new Date(""+e)},!0),this.currentDate=new Date(""+this.value)},t.prototype.compareMonth=function(e,t){return e.getFullYear()>t.getFullYear()?1:e.getFullYear()<t.getFullYear()?-1:e.getMonth()===t.getMonth()?0:e.getMonth()>t.getMonth()?1:-1},t}(r.Component);s([r.Property(null)],v.prototype,"value",void 0),s([r.Property(new Date(1900,0,1))],v.prototype,"min",void 0),s([r.Property(new Date(2099,11,31))],v.prototype,"max",void 0),s([r.Property(0)],v.prototype,"firstDayOfWeek",void 0),s([r.Property("month")],v.prototype,"start",void 0),s([r.Property("month")],v.prototype,"depth",void 0),s([r.Property(!1)],v.prototype,"weekNumber",void 0),s([r.Event()],v.prototype,"created",void 0),s([r.Event()],v.prototype,"destroyed",void 0),s([r.Event()],v.prototype,"change",void 0),s([r.Event()],v.prototype,"navigated",void 0),s([r.Event()],v.prototype,"renderDayCell",void 0),v=s([n.NotifyPropertyChanges],v),t.Calendar=v,t.calendarBuilder=r.CreateBuilder(v)}.apply(t,n))&&(e.exports=i)},function(t,r){t.exports=e},function(e,t,r){var n,i;n=[r,t,r(5)],void 0!==(i=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r)}.apply(t,n))&&(e.exports=i)},function(e,t,r){var n,i;n=[r,t,r(6),r(7)],void 0!==(i=function(e,t,r,n){"use strict";function i(e,t){var r=document.createElement(e);return void 0===t?r:(r.innerHTML=t.innerHTML?t.innerHTML:"",void 0!==t.className&&(r.className=t.className),void 0!==t.id&&(r.id=t.id),void 0!==t.styles&&r.setAttribute("style",t.styles),void 0!==t.attrs&&p(r,t.attrs),r)}function a(e,t){for(var r=o(t),n=0,i=e;n<i.length;n++)for(var a=i[n],s=0,l=r;s<l.length;s++){var h=l[s];a.classList.contains(h)||a.classList.add(h)}return e}function s(e,t){for(var r=o(t),n=0,i=e;n<i.length;n++){var a=i[n];if(""!==a.className)for(var s=0,l=r;s<l.length;s++){var h=l[s];a.classList.remove(h)}}return e}function o(e){var t=[];return"string"==typeof e?t.push(e):t=e,t}function l(e){var t=e;return""===t.style.visibility&&t.offsetWidth>0}function h(e,t){for(var r=document.createDocumentFragment(),n=0,i=e;n<i.length;n++){var a=i[n];r.appendChild(a)}return t.insertBefore(r,t.firstElementChild),e}function c(e,t){for(var r=document.createDocumentFragment(),n=0,i=e;n<i.length;n++){var a=i[n];r.appendChild(a)}return t.appendChild(r),e}function u(e){return e.parentNode.removeChild(e)}function d(e){var t=e.parentNode;r.EventHandler.clearEvents(e),t.removeChild(e)}function p(e,t){for(var r=Object.keys(t),n=e,i=0,a=r;i<a.length;i++){var s=a[i];n.setAttribute(s,t[s])}return n}function v(e,t){return void 0===t&&(t=document),t.querySelector(e)}function f(e,t){return void 0===t&&(t=document),t.querySelectorAll(e)}function m(e,t){var r=e;if("function"==typeof r.closest)return r.closest(t);for(;r&&1===r.nodeType;){if(w(r,t))return r;r=r.parentNode}return null}function g(e){for(var t=[],r=Array.prototype.slice.call(e.parentNode.childNodes),n=0,i=r;n<i.length;n++){var a=i[n];a.nodeType===Node.ELEMENT_NODE&&e!==a&&t.push(a)}return t}function y(e,t,r){var i=e.getAttribute(t);return n.isNullOrUndefined(i)&&(e.setAttribute(t,r.toString()),i=r),i}function D(e,t){void 0!==t&&Object.keys(t).forEach(function(r){e.style[r]=t[r]})}function b(e,t,r){a([e],t),s([e],r)}function w(e,t){var r=e.matches||e.msMatchesSelector||e.webkitMatchesSelector;return r?r.call(e,t):-1!==[].indexOf.call(document.querySelectorAll(t),e)}Object.defineProperty(t,"__esModule",{value:!0}),t.createElement=i,t.addClass=a,t.removeClass=s,t.isVisible=l,t.prepend=h,t.append=c,t.detach=u,t.remove=d,t.attributes=p,t.select=v,t.selectAll=f,t.closest=m,t.siblings=g,t.getAttributeOrDefault=y,t.setStyleAttribute=D,t.classList=b,t.matches=w}.apply(t,n))&&(e.exports=i)},function(e,t,r){var n,i;n=[r,t,r(7)],void 0!==(i=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.addOrGetEventData=function(e){return"__eventList"in e?e.__eventList.events:(e.__eventList={},e.__eventList.events=[])},e.add=function(t,n,i,a,s){var o,l=e.addOrGetEventData(t);o=s?r.debounce(i,s):i,a&&(o=o.bind(a));for(var h=n.split(" "),c=0;c<h.length;c++)l.push({name:h[c],listener:i,debounce:o}),t.addEventListener(h[c],o)},e.remove=function(t,r,n){for(var i=e.addOrGetEventData(t),a=r.split(" "),s=0;s<a.length;s++)!function(e){var r,s=-1;i&&0!==i.length&&i.some(function(t,i){return t.name===a[e]&&t.listener.toString()===n.toString()&&(s=i,r=t.debounce,!0)}),-1!==s&&i.splice(s,1),t.removeEventListener(a[e],r)}(s)},e.clearEvents=function(t){var n,i;n=e.addOrGetEventData(t),i=r.extend([],i,n);for(var a=0;a<i.length;a++)t.removeEventListener(i[a].name,i[a].debounce),n.shift()},e.trigger=function(t,r,n){for(var i=e.addOrGetEventData(t),a=0,s=i;a<s.length;a++){var o=s[a];o.name===r&&o.debounce.call(this,n)}},e}();t.EventHandler=n}.apply(t,n))&&(e.exports=i)},function(e,t,r){var n,i;n=[r,t],void 0!==(i=function(e,t){"use strict";function r(e,t){var r=t;return r.unshift(void 0),new(Function.prototype.bind.apply(e,r))}function n(e){var t,r=new Uint16Array(5);(window.msCrypto||window.crypto).getRandomValues(r);var n="ej2"+x(r),i=function(r){r.source===window&&"string"==typeof r.data&&r.data.length<=32&&r.data===n&&(e(),t())};return window.addEventListener("message",i,!1),window.postMessage(n,"*"),t=function(){window.removeEventListener("message",i)}}function i(e,t){for(var r=t,n=e.split("."),i=0;i<n.length&&!d(r);i++)r=r[n[i]];return r}function a(e,t,r){var n,i,a=e.split("."),s=r||{},o=s,l=a.length;for(n=0;n<l;n++)i=a[n],n+1===l?o[i]=void 0===t?{}:t:u(o[i])&&(o[i]={}),o=o[i];return s}function s(e,t){delete e[t]}function o(e){var t={};return!u(e)&&e.constructor===t.constructor}function l(e,t){return e[t]}function h(e,t){if(!u(t))for(var r=e,n=t,i=Object.keys(t),a=0,s=i;a<s.length;a++){var o=s[a];r[o]=n[o]}}function c(e,t,r,n){var i=e||{},a=arguments.length;n&&(a-=1);for(var s=arguments,l=1;l<a;l++)!function(e){if(!s[e])return"continue";var t=s[e];Object.keys(t).forEach(function(e){var r,a=i[e],s=t[e];n&&o(s)?(r=o(a)?a:{},i[e]=c({},r,s,!0)):i[e]=s})}(l);return i}function u(e){return void 0===e||null===e}function d(e){return void 0===e}function p(e){return e+"_"+C++}function v(e,t){var r,n=this;return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=i[0],o=function(){return r=null,e.call(n,s)};clearTimeout(r),r=setTimeout(o,t)}}function f(e){for(var t=[],r=Object.keys(e),n=0,i=r;n<i.length;n++){var a=i[n];t.push(encodeURIComponent(a)+"="+encodeURIComponent(""+e[a]))}return t.join("&")}function m(e){var t=Object.prototype.toString;return"[object Array]"===t.call(e)&&"[object Object]"===t.call(e[0])}function g(e,t){var r=e;return r===t||!(r===document||!r)&&g(r.parentNode,t)}function y(e){try{throw new Error(e)}catch(e){throw e.message+"\n"+e.stack}}function D(e,t){var r=document.createElement("div"),n=[].slice.call(document.getElementsByTagName("head")[0].querySelectorAll("link, style")),i="";u(t)&&(t=window.open("","print","height=452,width=1024,tabbar=no")),r.appendChild(e.cloneNode(!0));for(var a=0,s=n.length;a<s;a++)i+=n[a].outerHTML;t.document.write("<!DOCTYPE html> <html><head>"+i+"</head><body>"+r.innerHTML+"<script> (function() { window.ready = true; })(); <\/script></body></html>"),t.document.close(),t.focus();var o=setInterval(function(){t.ready&&(t.print(),t.close(),clearInterval(o))},500);return t}function b(e){var t=e+"";return"auto"===t||-1!==t.indexOf("%")||-1!==t.indexOf("px")?t:t+"px"}function w(e,t){var r="string"==typeof e?document.querySelector(e):e;if(r[k])for(var n=0,i=r[k];n<i.length;n++){var a=i[n];if(a instanceof t)return a}return null}function E(e,t){var r="string"==typeof e?document.querySelector(e):e;r[k]?r[k].push(t):r[k]=[t]}function x(e){for(var t="",r=0;r<5;r++)t+=(r?",":"")+e[r];return t}Object.defineProperty(t,"__esModule",{value:!0});var k="ej2_instances",C=0;t.createInstance=r,t.setImmediate=n,t.getValue=i,t.setValue=a,t.deleteObject=s,t.isObject=o,t.getEnumValue=l,t.merge=h,t.extend=c,t.isNullOrUndefined=u,t.isUndefined=d,t.getUniqueID=p,t.debounce=v,t.queryParams=f,t.isObjectArray=m,t.compareElementParent=g,t.throwError=y,t.print=D,t.formatUnit=b,t.getInstance=w,t.addInstance=E}.apply(t,n))&&(e.exports=i)},function(e,t,r){var n,i;n=[r,t,r(7)],void 0!==(i=function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(r)}.apply(t,n))&&(e.exports=i)}])});

@@ -20,3 +20,3 @@ var __extends = (this && this.__extends) || (function () {

import { cldrData, getDefaultDateObject } from '@syncfusion/ej2-base';
import { createElement, removeClass, remove, addClass, setStyleAttribute, attributes } from '@syncfusion/ej2-base/dom';
import { createElement, removeClass, remove, addClass, attributes } from '@syncfusion/ej2-base/dom';
import { isNullOrUndefined, getValue, getUniqueID, extend } from '@syncfusion/ej2-base/util';

@@ -46,4 +46,5 @@ var ROOT = 'e-calendar';

var TITLE = 'e-title';
var LINK = 'e-link';
var LINK = 'e-day';
var WEEKHEADER = 'e-week-header';
var ZOOMIN = 'e-zoomin';
var dayMilliSeconds = 86400000;

@@ -54,2 +55,3 @@ var Calendar = (function (_super) {

var _this = _super.call(this, options, element) || this;
_this.effect = '';
_this.keyConfigs = {

@@ -81,3 +83,3 @@ controlUp: 'ctrl+38',

attributes(this.element, {
'role': 'calendar'
'data-role': 'calendar'
});

@@ -94,6 +96,6 @@ this.processDate();

Calendar.prototype.validateDate = function () {
this.setProperties({ value: new Date('' + this.value) }, true);
this.currentDate = this.currentDate ? this.currentDate : this.resetTime(new Date());
if (!isNullOrUndefined(this.value) && this.min <= this.max && this.value >= this.min && this.value <= this.max) {
this.setProperties({ value: this.resetTime(this.value) }, true);
this.currentDate = this.resetTime(new Date(this.value));
this.currentDate = this.resetTime(new Date('' + this.value));
}

@@ -122,11 +124,11 @@ if (isNaN(+this.value)) {

if (this.min <= this.max && this.value && this.value <= this.max && this.value >= this.min) {
this.currentDate = new Date(this.value);
this.currentDate = new Date('' + this.value);
}
else {
if (this.min <= this.max && !this.value && this.currentDate > this.max) {
this.currentDate = new Date(this.max);
this.currentDate = new Date('' + this.max);
}
else {
if (this.currentDate < this.min) {
this.currentDate = new Date(this.min);
this.currentDate = new Date('' + this.min);
}

@@ -139,7 +141,9 @@ }

'aria-disabled': 'false',
'role': 'button'
'role': 'button',
'aria-label': 'previous month'
};
var ariaNextAttrs = {
'aria-disabled': 'false',
'role': 'button'
'role': 'button',
'aria-label': 'next month'
};

@@ -180,3 +184,3 @@ var ariaTitleAttrs = {

if (this.locale === 'en' || this.locale === 'en-US') {
cldrObj = (getValue('days.stand-alone.abbreviated', getDefaultDateObject()));
cldrObj = (getValue('days.stand-alone.short', getDefaultDateObject()));
}

@@ -238,3 +242,2 @@ else {

Calendar.prototype.keyActionHandle = function (e) {
this.effect = '';
var view = this.getViewNumber(this.currentView());

@@ -245,2 +248,3 @@ var focusedDate = this.tbodyEle.querySelector('tr td.e-focused-date');

var levelRestrict = (view === depthValue && this.getViewNumber(this.start) >= depthValue);
this.effect = '';
switch (e.action) {

@@ -337,3 +341,3 @@ case 'moveLeft':

Calendar.prototype.KeyboardNavigate = function (num, currentView) {
var date = new Date(this.currentDate);
var date = new Date('' + this.currentDate);
switch (currentView) {

@@ -385,3 +389,3 @@ case 2:

var cellsCount = 42;
var localDate = this.resetTime(new Date(this.currentDate));
var localDate = this.resetTime(new Date('' + this.currentDate));
var numCells = this.weekNumber ? 8 : 7;

@@ -417,3 +421,2 @@ var currentMonth = localDate.getMonth();

}
attributes(tdEle, { 'aria-label': '' + title });
if (currentMonth !== localDate.getMonth()) {

@@ -433,2 +436,7 @@ addClass([tdEle], OTHERMONTH);

this.renderDayCellEvent(args);
if (args.isDisabled) {
if (this.value && +this.resetTime(this.value) === +args.date) {
this.setProperties({ value: null }, true);
}
}
if (this.renderDaycellArg.isDisabled && !tdEle.classList.contains(SELECTED)) {

@@ -469,12 +477,12 @@ addClass([tdEle], DISABLED);

}
setStyleAttribute(this.theadEle, { 'display': '' });
this.contentHdr();
this.renderTemplate(tdEles, numCells, MONTH);
};
Calendar.prototype.renderYears = function () {
this.removeTheadEle();
var numCells = 4;
var days;
var tdEles = [];
setStyleAttribute(this.theadEle, { 'display': 'none' });
var valueUtil = isNullOrUndefined(this.value);
var curDate = new Date(this.currentDate);
var curDate = new Date('' + this.currentDate);
var mon = curDate.getMonth();

@@ -484,6 +492,6 @@ var yr = curDate.getFullYear();

var curYrs = localDate.getFullYear();
var minYr = new Date(this.min).getFullYear();
var minMonth = new Date(this.min).getMonth();
var maxYr = new Date(this.max).getFullYear();
var maxMonth = new Date(this.max).getMonth();
var minYr = new Date('' + this.min).getFullYear();
var minMonth = new Date('' + this.min).getMonth();
var maxYr = new Date('' + this.max).getFullYear();
var maxMonth = new Date('' + this.max).getMonth();
localDate.setMonth(0);

@@ -504,3 +512,2 @@ this.titleUpdate(this.currentDate, 'months');

addClass([tdEle], SELECTED);
this.ariaAttr(tdEle);
}

@@ -512,2 +519,3 @@ else {

}
localDate.setDate(1);
localDate.setMonth(localDate.getMonth() + 1);

@@ -523,7 +531,7 @@ if (!tdEle.classList.contains(DISABLED)) {

Calendar.prototype.renderDecades = function () {
this.removeTheadEle();
var numCells = 4;
var yearCell = 12;
var tdEles = [];
setStyleAttribute(this.theadEle, { 'display': 'none' });
var localDate = new Date(this.currentDate);
var localDate = new Date('' + this.currentDate);
localDate.setMonth(0);

@@ -542,3 +550,3 @@ localDate.setDate(1);

dayLink.textContent = year.toString();
if (year < new Date(this.min).getFullYear() || year > new Date(this.max).getFullYear()) {
if (year < new Date('' + this.min).getFullYear() || year > new Date('' + this.max).getFullYear()) {
addClass([tdEle], DISABLED);

@@ -548,3 +556,2 @@ }

addClass([tdEle], SELECTED);
this.ariaAttr(tdEle);
}

@@ -561,3 +568,2 @@ else {

tdEles.push(tdEle);
setStyleAttribute(this.theadEle, { attrs: { 'display': 'block' } });
}

@@ -569,3 +575,3 @@ this.renderTemplate(tdEles, numCells, 'e-decade');

var value = this.resetTime(date).valueOf();
return createElement('td', { attrs: { 'id': '' + getUniqueID('' + value), 'aria-selected': 'false', 'role': 'grid-cell' } });
return createElement('td', { attrs: { 'id': '' + getUniqueID('' + value), 'aria-selected': 'false', 'role': 'gridcell' } });
};

@@ -584,9 +590,14 @@ Calendar.prototype.firstDay = function (date) {

;
Calendar.prototype.removeTheadEle = function () {
if (this.element.querySelectorAll('.e-content table thead')[0]) {
remove(this.theadEle);
}
};
Calendar.prototype.renderTemplate = function (elements, numCells, classNm) {
var view = this.getViewNumber(this.currentView());
var trEle;
this.tbodyEle = createElement('tbody', { attrs: { 'role': 'rowgroup' } });
this.tbodyEle = createElement('tbody');
this.table.appendChild(this.tbodyEle);
removeClass([this.contentEle], [MONTH, DECADE, YEAR]);
addClass([this.contentEle], classNm);
removeClass([this.contentEle, this.headerEle], [MONTH, DECADE, YEAR]);
addClass([this.contentEle, this.headerEle], [classNm]);
var weekNumCell = 41;

@@ -628,4 +639,4 @@ var numberCell = 35;

}
this.ariaActivedescendent();
this.changeHandler();
addClass([this.headerEle], 'e-' + this.currentView());
};

@@ -660,2 +671,4 @@ Calendar.prototype.clickHandler = function (e) {

remove(this.tbodyEle);
this.currentDate = d;
this.effect = ZOOMIN;
this.renderMonths();

@@ -669,3 +682,3 @@ }

this.currentDate.setFullYear(d.getFullYear());
this.effect = 'e-zoomin';
this.effect = ZOOMIN;
remove(this.tbodyEle);

@@ -681,3 +694,3 @@ this.renderMonths();

this.currentDate.setFullYear(d.getFullYear());
this.effect = 'e-zoomin';
this.effect = ZOOMIN;
remove(this.tbodyEle);

@@ -711,2 +724,3 @@ this.renderYears();

Calendar.prototype.onPropertyChanged = function (newProp, oldProp) {
this.effect = '';
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {

@@ -766,22 +780,28 @@ var prop = _a[_i];

};
Calendar.prototype.ariaAttr = function (tdEle) {
tdEle.setAttribute('aria-selected', 'true');
attributes(this.table, {
'aria-activedescendant': '' + tdEle.getAttribute('id')
});
Calendar.prototype.ariaActivedescendent = function () {
var focusedEle = this.tbodyEle.querySelector('tr td.e-focused-date');
var selectedEle = this.tbodyEle.querySelector('tr td.e-selected');
var title = this.globalize.formatDate(this.currentDate, { type: 'date', skeleton: 'full' });
if (selectedEle || focusedEle) {
(focusedEle || selectedEle).setAttribute('aria-selected', 'true');
(focusedEle || selectedEle).setAttribute('aria-label', 'The current focused date is ' + '' + title);
attributes(this.table, {
'aria-activedescendant': '' + (focusedEle || selectedEle).getAttribute('id')
});
}
};
Calendar.prototype.iconHandler = function () {
new Date(this.currentDate).setDate(1);
new Date('' + this.currentDate).setDate(1);
switch (this.currentView()) {
case 'month':
this.prevIconHandler(this.compareMonth(new Date(this.currentDate), this.min) < 1);
this.nextIconHandler(this.compareMonth(new Date(this.currentDate), this.max) > -1);
this.prevIconHandler(this.compareMonth(new Date('' + this.currentDate), this.min) < 1);
this.nextIconHandler(this.compareMonth(new Date('' + this.currentDate), this.max) > -1);
break;
case 'year':
this.prevIconHandler(this.compareYear(new Date(this.currentDate), this.min) < 1);
this.nextIconHandler(this.compareYear(new Date(this.currentDate), this.max) > -1);
this.prevIconHandler(this.compareYear(new Date('' + this.currentDate), this.min) < 1);
this.nextIconHandler(this.compareYear(new Date('' + this.currentDate), this.max) > -1);
break;
case 'decade':
this.prevIconHandler(this.compareDecade(new Date(this.currentDate), this.min) < 1);
this.nextIconHandler(this.compareDecade(new Date(this.currentDate), this.max) > -1);
this.prevIconHandler(this.compareDecade(new Date('' + this.currentDate), this.min) < 1);
this.nextIconHandler(this.compareDecade(new Date('' + this.currentDate), this.max) > -1);
}

@@ -795,2 +815,3 @@ };

this.keyboardModule.destroy();
this.element.innerHTML = '';
_super.prototype.destroy.call(this);

@@ -800,3 +821,3 @@ };

var currentView = this.getViewNumber(this.currentView());
this.effect = 'e-zoomin';
this.effect = ZOOMIN;
this.switchView(++currentView);

@@ -868,6 +889,6 @@ };

if (+date <= +this.min) {
this.currentDate = new Date(this.min);
this.currentDate = new Date('' + this.min);
}
if (+date >= +this.max) {
this.currentDate = new Date(this.max);
this.currentDate = new Date('' + this.max);
}

@@ -892,7 +913,7 @@ this.switchView(this.getViewNumber(view));

Calendar.prototype.getCultureObjects = function (ld, c) {
return getValue('main.' + '' + this.locale + '.dates.calendars.gregorian.days.format.abbreviated', ld);
return getValue('main.' + '' + this.locale + '.dates.calendars.gregorian.days.format.short', ld);
};
;
Calendar.prototype.getWeek = function (d) {
var currentDate = new Date(d).valueOf();
var currentDate = new Date('' + d).valueOf();
var date = new Date(d.getFullYear(), 0, 1).valueOf();

@@ -933,4 +954,12 @@ var a = (currentDate - date);

var ele = element || e.currentTarget;
this.setProperties({ value: new Date(date) }, true);
this.currentDate = new Date(date);
if (this.currentView() === 'decade') {
this.setDateDecade(this.currentDate, date.getFullYear());
}
else if (this.currentView() === 'year') {
this.setDateYear(this.currentDate, date);
}
else {
this.setProperties({ value: new Date('' + date) }, true);
this.currentDate = new Date('' + date);
}
if (!isNullOrUndefined(this.tbodyEle.querySelector('.' + SELECTED))) {

@@ -943,6 +972,5 @@ removeClass([this.tbodyEle.querySelector('.' + SELECTED)], SELECTED);

addClass([ele], SELECTED);
this.ariaAttr(ele);
this.setProperties({ value: new Date(date) }, true);
this.changedArgs = { value: this.value };
this.changeHandler();
this.ariaActivedescendent();
};

@@ -1044,3 +1072,3 @@ Calendar.prototype.prevIconHandler = function (disabled) {

var month;
var tmpDate = new Date(d);
var tmpDate = new Date('' + d);
date = 28;

@@ -1054,2 +1082,15 @@ month = tmpDate.getMonth();

};
Calendar.prototype.setDateDecade = function (date, year) {
date.setFullYear(year);
this.setProperties({ value: new Date('' + date) }, true);
};
;
Calendar.prototype.setDateYear = function (date, value) {
date.setFullYear(value.getFullYear(), value.getMonth(), date.getDate());
if (value.getMonth() !== date.getMonth()) {
date.setDate(0);
}
this.setProperties({ value: new Date('' + date) }, true);
this.currentDate = new Date('' + this.value);
};
Calendar.prototype.compareMonth = function (start, end) {

@@ -1056,0 +1097,0 @@ var result;

{
"_args": [
[
{
"raw": "@syncfusion/ej2-calendars@*",
"scope": "@syncfusion",
"escapedName": "@syncfusion%2fej2-calendars",
"name": "@syncfusion/ej2-calendars",
"rawSpec": "*",
"spec": "*",
"type": "range"
},
"C:\\Users\\ajithr\\Desktop\\ej2-release\\node_modules\\@syncfusion\\ej2"
]
],
"_from": "@syncfusion/ej2-calendars@*",
"_id": "@syncfusion/ej2-calendars@1.0.10",
"_inCache": true,
"_location": "/@syncfusion/ej2-calendars",
"_nodeVersion": "6.11.0",
"_npmUser": {
"name": "ej2",
"email": "pipeline@syncfusion.com"
},
"_npmVersion": "3.10.10",
"_phantomChildren": {},
"_requested": {
"raw": "@syncfusion/ej2-calendars@*",
"scope": "@syncfusion",
"escapedName": "@syncfusion%2fej2-calendars",
"name": "@syncfusion/ej2-calendars",
"rawSpec": "*",
"spec": "*",
"type": "range"
},
"_requiredBy": [
"/@syncfusion/ej2",
"/@syncfusion/ej2-ng-calendars"
],
"_resolved": "http://syncdeskn6525:8081/repository/ej2-production/@syncfusion/ej2-calendars/-/ej2-calendars-1.0.10.tgz",
"_shasum": "dda5b82bb9ae67ca16c935f1372d05e308539087",
"_shrinkwrap": null,
"_spec": "@syncfusion/ej2-calendars@*",
"_where": "C:\\Users\\ajithr\\Desktop\\ej2-release\\node_modules\\@syncfusion\\ej2",
"author": {
"name": "Syncfusion Inc."
},
"bugs": {
"url": "https://github.com/syncfusion/ej2-calendars/issues"
},
"name": "@syncfusion/ej2-calendars",
"version": "1.0.11",
"description": "Syncfusion TypeScript Calendar",
"author": "Syncfusion Inc.",
"license": "SEE LICENSE IN license",
"module": "dist/es6/index.js",
"dependencies": {
"@syncfusion/ej2-base": "^1.0.10",
"@syncfusion/ej2-base": "^1.0.11",
"intl": "^1.2.5"
},
"description": "Essential JS 2 Calendar",
"devDependencies": {

@@ -63,8 +19,2 @@ "@types/chai": "^3.4.28",

},
"dist": {
"shasum": "dda5b82bb9ae67ca16c935f1372d05e308539087",
"tarball": "http://syncdeskn6525:8081/repository/ej2-production/@syncfusion/ej2-calendars/-/ej2-calendars-1.0.10.tgz"
},
"gitHead": "11fe00456eef2cbce7ff5e6eebf54d08f81e6966",
"homepage": "https://github.com/syncfusion/ej2-calendars#readme",
"keywords": [

@@ -84,24 +34,6 @@ "ej2",

],
"license": "SEE LICENSE IN license",
"maintainers": [
{
"name": "ej2",
"email": "pipeline@syncfusion.com"
}
],
"module": "dist/es6/index.js",
"name": "@syncfusion/ej2-calendars",
"optionalDependencies": {},
"readme": "# Calendar\r\n\r\nCalendar interface for selecting dates with options for disabling dates, restricting selection and showing custom events.It comes with [documentation](http://ej2.syncfusion.com/documentation/calendar) and support, which is available under commercial and community licenses. Please visit www.syncfusion.com to get started. \r\n\r\n## Resources\r\n\r\n[Demo](http://ej2.syncfusion.com/demos/#/calendar/default.html) \r\n[Documentation](http://ej2.syncfusion.com/documentation/calendar)\n\n# 1.0.10\r\n\r\n## Calendar\r\n\r\n### Bug Fixes\r\n\r\nEnhanced the Calendar animation when navigating back and forth from month to year and vice versa",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/syncfusion/ej2-calendars.git"
},
"scripts": {
"ci-publish": "gulp ci-publish",
"compile": "gulp ci-compile",
"test": "gulp ci-test"
},
"version": "1.0.10"
"url": "https://github.com/syncfusion/ej2-calendars.git"
}
}

@@ -1,2 +0,2 @@

import { Component, EventHandler, Property, Event, CreateBuilder, Internationalization, EmitType } from '@syncfusion/ej2-base'; import { NotifyPropertyChanges, INotifyPropertyChanged, KeyboardEvents, KeyboardEventArgs } from '@syncfusion/ej2-base'; import { cldrData, BaseEventArgs, getDefaultDateObject } from '@syncfusion/ej2-base'; import { createElement, removeClass, remove, addClass, setStyleAttribute, attributes } from '@syncfusion/ej2-base/dom'; import { isNullOrUndefined, getValue, getUniqueID, extend } from '@syncfusion/ej2-base/util'; import { CalendarHelper } from './calendar-builder';
import { Component, EventHandler, Property, Event, CreateBuilder, Internationalization, EmitType } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, KeyboardEvents, KeyboardEventArgs } from '@syncfusion/ej2-base';import { cldrData, BaseEventArgs, getDefaultDateObject } from '@syncfusion/ej2-base';import { createElement, removeClass, remove, addClass, attributes } from '@syncfusion/ej2-base/dom';import { isNullOrUndefined, getValue, getUniqueID, extend } from '@syncfusion/ej2-base/util';import { CalendarHelper } from './calendar-builder';
import {CalendarView,ChangedEventArgs,NavigatedEventArgs,RenderDayCellEventArgs} from "./calendar";

@@ -11,37 +11,37 @@ import {ComponentModel} from '@syncfusion/ej2-base';

/**
* Gets or sets the selected date of the calendar. * @default null */ value?: Date;
* Gets or sets the selected date of the calendar. * @default null */ value?: Date;
/**
* Gets or sets the minimum date that can be allowed to select in the calendar. * @default new Date(1900, 00, 01) */ min?: Date;
* Gets or sets the minimum date that can be allowed to select in the calendar. * @default new Date(1900, 00, 01) */ min?: Date;
/**
* Gets or sets the maximum date that can be allowed to select in the calendar * @default new Date(2099, 11, 31) */ max?: Date;
* Gets or sets the maximum date that can be allowed to select in the calendar * @default new Date(2099, 11, 31) */ max?: Date;
/**
* Gets or sets the calendar's first day of week, by default the first day of the week will * be based on the current culture. * @default '0' */ firstDayOfWeek?: number;
* Gets or sets the calendar's first day of week, by default the first day of the week will * be based on the current culture. * @default '0' */ firstDayOfWeek?: number;
/**
* Specifies the initial view of the calendar, when it is opened. * With help of this property, initial view can be changed to year or decade view. * @default 'month' */ start?: CalendarView;
* Specifies the initial view of the calendar, when it is opened. * With help of this property, initial view can be changed to year or decade view. * @default 'month' */ start?: CalendarView;
/**
* Sets the maximum level of view(month, year, decade)in the calendar. * depth view should be smaller than the start view, so that it will restricts the view navigation. * @default 'month' */ depth?: CalendarView;
* Sets the maximum level of view(month, year, decade)in the calendar. * depth view should be smaller than the start view, so that it will restricts the view navigation. * @default 'month' */ depth?: CalendarView;
/**
* Determines whether the week number of the calendar to be displayed. * It will display the week number in every week row. * @default false */ weekNumber?: boolean;
* Determines whether the week number of the calendar to be displayed. * It will display the week number in every week row. * @default false */ weekNumber?: boolean;
/**
     * Triggers when calendar is created.      * @event      */ created?: EmitType<Object>;
     * Triggers when calendar is created.     * @event      */ created?: EmitType<Object>;
/**
     * Triggers when calendar is destroyed.      * @event      */ destroyed?: EmitType<Object>;
     * Triggers when calendar is destroyed.     * @event      */ destroyed?: EmitType<Object>;
/**
* Triggers when the calendar value has been changed. * @event */ change?: EmitType<ChangedEventArgs>;
* Triggers when the calendar value has been changed. * @event */ change?: EmitType<ChangedEventArgs>;
/**
* Triggers when the calendar has been navigated to another level or within the same level of view. * @event */ navigated?: EmitType<NavigatedEventArgs>;
* Triggers when the calendar has been navigated to another level or within the same level of view. * @event */ navigated?: EmitType<NavigatedEventArgs>;
/**
* Triggers on rendering of each day cell of the calendar. * @event */ renderDayCell?: EmitType<RenderDayCellEventArgs>;
* Triggers on rendering of each day cell of the calendar. * @event */ renderDayCell?: EmitType<RenderDayCellEventArgs>;
}

@@ -38,3 +38,2 @@ import { Component, Internationalization, EmitType } from '@syncfusion/ej2-base';

protected navigateHandler: Function;
protected baseElement: HTMLElement;
protected keyConfigs: {

@@ -142,2 +141,3 @@ [key: string]: string;

private lastDay(date);
private removeTheadEle();
private renderTemplate(elements, numCells, classNm);

@@ -165,3 +165,3 @@ private clickHandler(e);

private titleUpdate(date, view);
private ariaAttr(tdEle);
private ariaActivedescendent();
private iconHandler();

@@ -215,2 +215,4 @@ /**

private getMaxDays(d);
private setDateDecade(date, year);
private setDateYear(date, value);
private compareMonth(start, end);

@@ -217,0 +219,0 @@ }

@@ -43,4 +43,5 @@ var __extends = (this && this.__extends) || (function () {

var TITLE = 'e-title';
var LINK = 'e-link';
var LINK = 'e-day';
var WEEKHEADER = 'e-week-header';
var ZOOMIN = 'e-zoomin';
var dayMilliSeconds = 86400000;

@@ -51,2 +52,3 @@ var Calendar = (function (_super) {

var _this = _super.call(this, options, element) || this;
_this.effect = '';
_this.keyConfigs = {

@@ -78,3 +80,3 @@ controlUp: 'ctrl+38',

dom_1.attributes(this.element, {
'role': 'calendar'
'data-role': 'calendar'
});

@@ -91,6 +93,6 @@ this.processDate();

Calendar.prototype.validateDate = function () {
this.setProperties({ value: new Date('' + this.value) }, true);
this.currentDate = this.currentDate ? this.currentDate : this.resetTime(new Date());
if (!util_1.isNullOrUndefined(this.value) && this.min <= this.max && this.value >= this.min && this.value <= this.max) {
this.setProperties({ value: this.resetTime(this.value) }, true);
this.currentDate = this.resetTime(new Date(this.value));
this.currentDate = this.resetTime(new Date('' + this.value));
}

@@ -119,11 +121,11 @@ if (isNaN(+this.value)) {

if (this.min <= this.max && this.value && this.value <= this.max && this.value >= this.min) {
this.currentDate = new Date(this.value);
this.currentDate = new Date('' + this.value);
}
else {
if (this.min <= this.max && !this.value && this.currentDate > this.max) {
this.currentDate = new Date(this.max);
this.currentDate = new Date('' + this.max);
}
else {
if (this.currentDate < this.min) {
this.currentDate = new Date(this.min);
this.currentDate = new Date('' + this.min);
}

@@ -136,7 +138,9 @@ }

'aria-disabled': 'false',
'role': 'button'
'role': 'button',
'aria-label': 'previous month'
};
var ariaNextAttrs = {
'aria-disabled': 'false',
'role': 'button'
'role': 'button',
'aria-label': 'next month'
};

@@ -177,3 +181,3 @@ var ariaTitleAttrs = {

if (this.locale === 'en' || this.locale === 'en-US') {
cldrObj = (util_1.getValue('days.stand-alone.abbreviated', ej2_base_3.getDefaultDateObject()));
cldrObj = (util_1.getValue('days.stand-alone.short', ej2_base_3.getDefaultDateObject()));
}

@@ -235,3 +239,2 @@ else {

Calendar.prototype.keyActionHandle = function (e) {
this.effect = '';
var view = this.getViewNumber(this.currentView());

@@ -242,2 +245,3 @@ var focusedDate = this.tbodyEle.querySelector('tr td.e-focused-date');

var levelRestrict = (view === depthValue && this.getViewNumber(this.start) >= depthValue);
this.effect = '';
switch (e.action) {

@@ -334,3 +338,3 @@ case 'moveLeft':

Calendar.prototype.KeyboardNavigate = function (num, currentView) {
var date = new Date(this.currentDate);
var date = new Date('' + this.currentDate);
switch (currentView) {

@@ -382,3 +386,3 @@ case 2:

var cellsCount = 42;
var localDate = this.resetTime(new Date(this.currentDate));
var localDate = this.resetTime(new Date('' + this.currentDate));
var numCells = this.weekNumber ? 8 : 7;

@@ -414,3 +418,2 @@ var currentMonth = localDate.getMonth();

}
dom_1.attributes(tdEle, { 'aria-label': '' + title });
if (currentMonth !== localDate.getMonth()) {

@@ -430,2 +433,7 @@ dom_1.addClass([tdEle], OTHERMONTH);

this.renderDayCellEvent(args);
if (args.isDisabled) {
if (this.value && +this.resetTime(this.value) === +args.date) {
this.setProperties({ value: null }, true);
}
}
if (this.renderDaycellArg.isDisabled && !tdEle.classList.contains(SELECTED)) {

@@ -466,12 +474,12 @@ dom_1.addClass([tdEle], DISABLED);

}
dom_1.setStyleAttribute(this.theadEle, { 'display': '' });
this.contentHdr();
this.renderTemplate(tdEles, numCells, MONTH);
};
Calendar.prototype.renderYears = function () {
this.removeTheadEle();
var numCells = 4;
var days;
var tdEles = [];
dom_1.setStyleAttribute(this.theadEle, { 'display': 'none' });
var valueUtil = util_1.isNullOrUndefined(this.value);
var curDate = new Date(this.currentDate);
var curDate = new Date('' + this.currentDate);
var mon = curDate.getMonth();

@@ -481,6 +489,6 @@ var yr = curDate.getFullYear();

var curYrs = localDate.getFullYear();
var minYr = new Date(this.min).getFullYear();
var minMonth = new Date(this.min).getMonth();
var maxYr = new Date(this.max).getFullYear();
var maxMonth = new Date(this.max).getMonth();
var minYr = new Date('' + this.min).getFullYear();
var minMonth = new Date('' + this.min).getMonth();
var maxYr = new Date('' + this.max).getFullYear();
var maxMonth = new Date('' + this.max).getMonth();
localDate.setMonth(0);

@@ -501,3 +509,2 @@ this.titleUpdate(this.currentDate, 'months');

dom_1.addClass([tdEle], SELECTED);
this.ariaAttr(tdEle);
}

@@ -509,2 +516,3 @@ else {

}
localDate.setDate(1);
localDate.setMonth(localDate.getMonth() + 1);

@@ -520,7 +528,7 @@ if (!tdEle.classList.contains(DISABLED)) {

Calendar.prototype.renderDecades = function () {
this.removeTheadEle();
var numCells = 4;
var yearCell = 12;
var tdEles = [];
dom_1.setStyleAttribute(this.theadEle, { 'display': 'none' });
var localDate = new Date(this.currentDate);
var localDate = new Date('' + this.currentDate);
localDate.setMonth(0);

@@ -539,3 +547,3 @@ localDate.setDate(1);

dayLink.textContent = year.toString();
if (year < new Date(this.min).getFullYear() || year > new Date(this.max).getFullYear()) {
if (year < new Date('' + this.min).getFullYear() || year > new Date('' + this.max).getFullYear()) {
dom_1.addClass([tdEle], DISABLED);

@@ -545,3 +553,2 @@ }

dom_1.addClass([tdEle], SELECTED);
this.ariaAttr(tdEle);
}

@@ -558,3 +565,2 @@ else {

tdEles.push(tdEle);
dom_1.setStyleAttribute(this.theadEle, { attrs: { 'display': 'block' } });
}

@@ -566,3 +572,3 @@ this.renderTemplate(tdEles, numCells, 'e-decade');

var value = this.resetTime(date).valueOf();
return dom_1.createElement('td', { attrs: { 'id': '' + util_1.getUniqueID('' + value), 'aria-selected': 'false', 'role': 'grid-cell' } });
return dom_1.createElement('td', { attrs: { 'id': '' + util_1.getUniqueID('' + value), 'aria-selected': 'false', 'role': 'gridcell' } });
};

@@ -581,9 +587,14 @@ Calendar.prototype.firstDay = function (date) {

;
Calendar.prototype.removeTheadEle = function () {
if (this.element.querySelectorAll('.e-content table thead')[0]) {
dom_1.remove(this.theadEle);
}
};
Calendar.prototype.renderTemplate = function (elements, numCells, classNm) {
var view = this.getViewNumber(this.currentView());
var trEle;
this.tbodyEle = dom_1.createElement('tbody', { attrs: { 'role': 'rowgroup' } });
this.tbodyEle = dom_1.createElement('tbody');
this.table.appendChild(this.tbodyEle);
dom_1.removeClass([this.contentEle], [MONTH, DECADE, YEAR]);
dom_1.addClass([this.contentEle], classNm);
dom_1.removeClass([this.contentEle, this.headerEle], [MONTH, DECADE, YEAR]);
dom_1.addClass([this.contentEle, this.headerEle], [classNm]);
var weekNumCell = 41;

@@ -625,4 +636,4 @@ var numberCell = 35;

}
this.ariaActivedescendent();
this.changeHandler();
dom_1.addClass([this.headerEle], 'e-' + this.currentView());
};

@@ -657,2 +668,4 @@ Calendar.prototype.clickHandler = function (e) {

dom_1.remove(this.tbodyEle);
this.currentDate = d;
this.effect = ZOOMIN;
this.renderMonths();

@@ -666,3 +679,3 @@ }

this.currentDate.setFullYear(d.getFullYear());
this.effect = 'e-zoomin';
this.effect = ZOOMIN;
dom_1.remove(this.tbodyEle);

@@ -678,3 +691,3 @@ this.renderMonths();

this.currentDate.setFullYear(d.getFullYear());
this.effect = 'e-zoomin';
this.effect = ZOOMIN;
dom_1.remove(this.tbodyEle);

@@ -708,2 +721,3 @@ this.renderYears();

Calendar.prototype.onPropertyChanged = function (newProp, oldProp) {
this.effect = '';
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {

@@ -763,22 +777,28 @@ var prop = _a[_i];

};
Calendar.prototype.ariaAttr = function (tdEle) {
tdEle.setAttribute('aria-selected', 'true');
dom_1.attributes(this.table, {
'aria-activedescendant': '' + tdEle.getAttribute('id')
});
Calendar.prototype.ariaActivedescendent = function () {
var focusedEle = this.tbodyEle.querySelector('tr td.e-focused-date');
var selectedEle = this.tbodyEle.querySelector('tr td.e-selected');
var title = this.globalize.formatDate(this.currentDate, { type: 'date', skeleton: 'full' });
if (selectedEle || focusedEle) {
(focusedEle || selectedEle).setAttribute('aria-selected', 'true');
(focusedEle || selectedEle).setAttribute('aria-label', 'The current focused date is ' + '' + title);
dom_1.attributes(this.table, {
'aria-activedescendant': '' + (focusedEle || selectedEle).getAttribute('id')
});
}
};
Calendar.prototype.iconHandler = function () {
new Date(this.currentDate).setDate(1);
new Date('' + this.currentDate).setDate(1);
switch (this.currentView()) {
case 'month':
this.prevIconHandler(this.compareMonth(new Date(this.currentDate), this.min) < 1);
this.nextIconHandler(this.compareMonth(new Date(this.currentDate), this.max) > -1);
this.prevIconHandler(this.compareMonth(new Date('' + this.currentDate), this.min) < 1);
this.nextIconHandler(this.compareMonth(new Date('' + this.currentDate), this.max) > -1);
break;
case 'year':
this.prevIconHandler(this.compareYear(new Date(this.currentDate), this.min) < 1);
this.nextIconHandler(this.compareYear(new Date(this.currentDate), this.max) > -1);
this.prevIconHandler(this.compareYear(new Date('' + this.currentDate), this.min) < 1);
this.nextIconHandler(this.compareYear(new Date('' + this.currentDate), this.max) > -1);
break;
case 'decade':
this.prevIconHandler(this.compareDecade(new Date(this.currentDate), this.min) < 1);
this.nextIconHandler(this.compareDecade(new Date(this.currentDate), this.max) > -1);
this.prevIconHandler(this.compareDecade(new Date('' + this.currentDate), this.min) < 1);
this.nextIconHandler(this.compareDecade(new Date('' + this.currentDate), this.max) > -1);
}

@@ -792,2 +812,3 @@ };

this.keyboardModule.destroy();
this.element.innerHTML = '';
_super.prototype.destroy.call(this);

@@ -797,3 +818,3 @@ };

var currentView = this.getViewNumber(this.currentView());
this.effect = 'e-zoomin';
this.effect = ZOOMIN;
this.switchView(++currentView);

@@ -865,6 +886,6 @@ };

if (+date <= +this.min) {
this.currentDate = new Date(this.min);
this.currentDate = new Date('' + this.min);
}
if (+date >= +this.max) {
this.currentDate = new Date(this.max);
this.currentDate = new Date('' + this.max);
}

@@ -889,7 +910,7 @@ this.switchView(this.getViewNumber(view));

Calendar.prototype.getCultureObjects = function (ld, c) {
return util_1.getValue('main.' + '' + this.locale + '.dates.calendars.gregorian.days.format.abbreviated', ld);
return util_1.getValue('main.' + '' + this.locale + '.dates.calendars.gregorian.days.format.short', ld);
};
;
Calendar.prototype.getWeek = function (d) {
var currentDate = new Date(d).valueOf();
var currentDate = new Date('' + d).valueOf();
var date = new Date(d.getFullYear(), 0, 1).valueOf();

@@ -930,4 +951,12 @@ var a = (currentDate - date);

var ele = element || e.currentTarget;
this.setProperties({ value: new Date(date) }, true);
this.currentDate = new Date(date);
if (this.currentView() === 'decade') {
this.setDateDecade(this.currentDate, date.getFullYear());
}
else if (this.currentView() === 'year') {
this.setDateYear(this.currentDate, date);
}
else {
this.setProperties({ value: new Date('' + date) }, true);
this.currentDate = new Date('' + date);
}
if (!util_1.isNullOrUndefined(this.tbodyEle.querySelector('.' + SELECTED))) {

@@ -940,6 +969,5 @@ dom_1.removeClass([this.tbodyEle.querySelector('.' + SELECTED)], SELECTED);

dom_1.addClass([ele], SELECTED);
this.ariaAttr(ele);
this.setProperties({ value: new Date(date) }, true);
this.changedArgs = { value: this.value };
this.changeHandler();
this.ariaActivedescendent();
};

@@ -1041,3 +1069,3 @@ Calendar.prototype.prevIconHandler = function (disabled) {

var month;
var tmpDate = new Date(d);
var tmpDate = new Date('' + d);
date = 28;

@@ -1051,2 +1079,15 @@ month = tmpDate.getMonth();

};
Calendar.prototype.setDateDecade = function (date, year) {
date.setFullYear(year);
this.setProperties({ value: new Date('' + date) }, true);
};
;
Calendar.prototype.setDateYear = function (date, value) {
date.setFullYear(value.getFullYear(), value.getMonth(), date.getDate());
if (value.getMonth() !== date.getMonth()) {
date.setDate(0);
}
this.setProperties({ value: new Date('' + date) }, true);
this.currentDate = new Date('' + this.value);
};
Calendar.prototype.compareMonth = function (start, end) {

@@ -1053,0 +1094,0 @@ var result;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc