Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-calendars

Package Overview
Dependencies
2
Maintainers
2
Versions
234
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.14 to 1.0.16

4

dist/ej2-calendars.umd.min.js
/*!
* filename: ej2-calendars.umd.min.js
* version : 1.0.14
* version : 1.0.16
* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved.

@@ -11,2 +11,2 @@ * Use of this code is subject to the terms of our license.

!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 i=t("object"==typeof exports?require("@syncfusion/ej2-base"):e["@syncfusion/ej2-base"]);for(var a in i)("object"==typeof exports?exports:e)[a]=i[a]}}(this,function(e){return function(e){function t(a){if(i[a])return i[a].exports;var s=i[a]={exports:{},id:a,loaded:!1};return e[a].call(s.exports,s,s.exports,t),s.loaded=!0,s.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){var a,s;a=[i,t,i(1)],void 0!==(s=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}(i)}.apply(t,a))&&(e.exports=s)},function(e,t,i){var a,s;a=[i,t,i(2)],void 0!==(s=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}(i)}.apply(t,a))&&(e.exports=s)},function(e,t,i){var a,s,r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function a(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(a.prototype=i.prototype,new a)}}(),n=this&&this.__decorate||function(e,t,i,a){var s,r=arguments.length,n=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(n=(r<3?s(n):r>3?s(t,i,n):s(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};a=[i,t,i(3),i(3),i(3),i(3),i(3)],void 0!==(s=function(e,t,i,a,s,o,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l="e-disabled",c="e-overlay",d="e-other-month",u="e-selected",p="e-focused-date",v=function(e){function t(t,i){var a=e.call(this,t,i)||this;return a.effect="",a.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"},a}return r(t,e),t.prototype.render=function(){this.globalize=new i.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),!h.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=h.isNullOrUndefined(this.min)||!+this.min?this.min=new Date(1900,0,1):this.min,this.max=h.isNullOrUndefined(this.max)||!+this.max?this.max=new Date(2099,11,31):this.max,!h.isNullOrUndefined(this.value)&&this.value<=this.min&&this.min<=this.max?(this.setProperties({value:this.resetTime(this.min)},!0),this.changedArgs={value:this.value}):!h.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"},i={"aria-atomic":"true","aria-live":"assertive","aria-label":"title",role:"button"};this.headerEle=o.createElement("div",{className:"e-header"});var a=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,i),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"})),a.appendChild(this.prevIcon),a.appendChild(this.nextIcon),this.headerEle.appendChild(a),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?h.getValue("days.stand-alone.short",s.getDefaultDateObject()):this.getCultureObjects(s.cldrData,""+this.locale);for(var i=0,a=Object.keys(e);i<a.length;i++){var r=a[i];t.push(h.getValue(r,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 i=0;i<=6;i++)t+='<th class="">'+e[i]+"</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(){i.EventHandler.add(this.hdrTitleEle,"click",this.navTitle,this),this.keyboardModule=new a.KeyboardEvents(this.element,{eventName:"keydown",keyAction:this.keyActionHandle.bind(this),keyConfigs:this.keyConfigs})},t.prototype.keyActionHandle=function(e){var t=this.getViewNumber(this.currentView()),i=this.tbodyEle.querySelector("tr td.e-focused-date"),a=this.tbodyEle.querySelector("tr td.e-selected"),s=this.getViewNumber(this.depth),r=t===s&&this.getViewNumber(this.start)>=s;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(!h.isNullOrUndefined(i)||!h.isNullOrUndefined(a))if(r){var n=new Date(parseInt(""+(i||a).id,0));this.selectDate(e,this.resetTime(n),i||a)}else this.contentClick(null,--t,i||a);break;case"controlUp":this.title(),e.preventDefault();break;case"controlDown":h.isNullOrUndefined(i)&&(h.isNullOrUndefined(a)||r)||this.contentClick(null,--t,i||a),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 i=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=i;break;case 1:this.addMonths(this.currentDate,e),this.isMinMaxRange(this.currentDate)?(o.remove(this.tbodyEle),this.renderYears()):this.currentDate=i;break;case 0:this.addDay(this.currentDate,e),this.isMinMaxRange(this.currentDate)?(o.remove(this.tbodyEle),this.renderMonths()):this.currentDate=i}},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)),a=this.weekNumber?8:7,s=t.getMonth();this.titleUpdate(this.currentDate,"days");var r=t;for(t=new Date(r.getFullYear(),r.getMonth(),0,r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds());t.getDay()!==this.firstDayOfWeek;)this.setTime(t,-864e5);for(var n=0;n<42;++n){var h=o.createElement("td"),v=o.createElement("span");n%7==0&&this.weekNumber&&(v.textContent=""+this.getWeek(t),h.appendChild(v),o.addClass([h],"e-week-number"),e.push(h));var m=this.globalize.parseDate(this.globalize.formatDate(t,{skeleton:"full"}),{skeleton:"full"}),g=this.dayCell(t),f=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([g],l),o.addClass([g],c)):y.setAttribute("title",""+f),s!==t.getMonth()&&o.addClass([g],d),0!==t.getDay()&&6!==t.getDay()||o.addClass([g],"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&&!g.classList.contains(u)&&(o.addClass([g],l),o.addClass([g],c));var w=g.classList.contains(d),x=g.classList.contains(l);x||i.EventHandler.add(g,"click",this.clickHandler,this),b.isDisabled&&+this.value==+b.date&&this.setProperties({value:null},!0),w||x||!this.getDateVal(t)?this.currentDate.getDate()!==t.getDate()||w||x?(this.currentDate>=this.max&&parseInt(g.id,0)===+this.max&&!w&&!x&&o.addClass([g],p),this.currentDate<=this.min&&parseInt(g.id,0)===+this.min&&!w&&!x&&o.addClass([g],p)):o.addClass([g],p):o.addClass([g],u),this.resetTime(m).valueOf()===this.resetTime(new Date).valueOf()&&o.addClass([g],"e-today"),g.appendChild(this.renderDaycellArg.element),e.push(g),this.addDay(t,1)}this.contentHdr(),this.renderTemplate(e,a,"e-month")},t.prototype.renderYears=function(){this.removeTheadEle();var e=[],t=h.isNullOrUndefined(this.value),a=new Date(""+this.currentDate),s=a.getMonth(),r=a.getFullYear(),n=a,c=n.getFullYear(),d=new Date(""+this.min).getFullYear(),v=new Date(""+this.min).getMonth(),m=new Date(""+this.max).getFullYear(),g=new Date(""+this.max).getMonth();n.setMonth(0),this.titleUpdate(this.currentDate,"months");this.min>n||this.max;n.setDate(1);for(var f=0;f<12;++f){var y=this.dayCell(n),D=o.createElement("span"),b=this.value&&this.value.getMonth()===n.getMonth(),w=this.value&&this.value.getFullYear()===r&&b;D.textContent=this.globalize.formatDate(n,{type:"date",skeleton:"MMM"}),this.min&&(c<d||f<v&&c===d)||this.max&&(c>m||f>g&&c>=m)?o.addClass([y],l):!t&&w?o.addClass([y],u):n.getMonth()===s&&this.currentDate.getMonth()===s&&o.addClass([y],p),n.setDate(1),n.setMonth(n.getMonth()+1),y.classList.contains(l)||i.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 a=t.getFullYear();this.hdrTitleEle.textContent=a-a%10+" - "+(a-a%10+9);for(var s=new Date(a-a%10-1,0,1),r=s.getFullYear(),n=0;n<12;++n){var c=r+n;t.setFullYear(c);var d=this.dayCell(t);o.attributes(d,{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([d],l):h.isNullOrUndefined(this.value)||t.getFullYear()!==this.value.getFullYear()?t.getFullYear()!==this.currentDate.getFullYear()||d.classList.contains(l)||o.addClass([d],p):o.addClass([d],u),d.classList.contains(l)||i.EventHandler.add(d,"click",this.clickHandler,this),d.appendChild(v),e.push(d)}this.renderTemplate(e,4,"e-decade")},t.prototype.dayCell=function(e){var t=this.globalize.parseDate(this.globalize.formatDate(e,{skeleton:"full"}),{skeleton:"full"}),i=this.resetTime(t).valueOf();return o.createElement("td",{attrs:{id:""+h.getUniqueID(""+i),"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),i=Math.abs(t.getTimezoneOffset()-this.firstDay(e).getTimezoneOffset());return i&&t.setHours(this.firstDay(e).getHours()+i/60),t},t.prototype.removeTheadEle=function(){this.element.querySelectorAll(".e-content table thead")[0]&&o.remove(this.theadEle)},t.prototype.renderTemplate=function(e,t,i){var a,s=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],[i]);for(var r=t,n=0,h=0;h<e.length/t;++h){for(a=o.createElement("tr",{attrs:{role:"row"}}),n=0+n;n<r;n++)!e[n].classList.contains("e-week-number")&&e[n].children[0]&&o.addClass([e[n].children[0]],["e-day","e-ripple-style"]),a.appendChild(e[n]),!this.weekNumber&&6===n&&e[6].classList.contains(d)&&o.addClass([a],"e-month-hide"),this.weekNumber?41===n&&e[41].classList.contains(d)&&o.addClass([a],"e-month-hide"):35===n&&e[35].classList.contains(d)&&o.addClass([a],"e-month-hide");r+=t,n+=0,this.tbodyEle.appendChild(a)}this.table.querySelector("tbody").className=this.effect,this.iconHandler(),this.changedArgs={value:this.value},(s!==this.getViewNumber(this.currentView())||0===s&&s!==this.getViewNumber(this.currentView()))&&this.navigateHandler(),this.ariaActivedescendent(),this.changeHandler()},t.prototype.clickHandler=function(e){var t=e.currentTarget;e.preventDefault();var i=this.getViewNumber(this.currentView());t.classList.contains(d)?(this.value=this.getIdValue(e,null),this.contentClick(e,0,null)):i===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?this.contentClick(e,1,null):2===i?this.contentClick(e,1,null):t.classList.contains(d)||0!==i?this.contentClick(e,0,t):this.selectDate(e,this.getIdValue(e,null),null)},t.prototype.contentClick=function(e,t,i){var a=this.getViewNumber(this.currentView()),s=this.getIdValue(e,i);switch(t){case 0:a===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?(o.remove(this.tbodyEle),this.currentDate=s,this.effect="e-zoomin",this.renderMonths()):(this.currentDate.setMonth(s.getMonth()),s.getMonth()>0&&this.currentDate.getMonth()!==s.getMonth()&&this.currentDate.setDate(0),this.currentDate.setFullYear(s.getFullYear()),this.effect="e-zoomin",o.remove(this.tbodyEle),this.renderMonths());break;case 1:a===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?this.selectDate(e,s,null):(this.currentDate.setFullYear(s.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 a=0,s=Object.keys(e);a<s.length;a++){switch(s[a]){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 i.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 a=new i.Internationalization(this.locale);switch(t){case"days":this.hdrTitleEle.textContent=a.formatDate(e,{type:"date",skeleton:"yMMMM"});break;case"months":this.hdrTitleEle.textContent=a.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"),i=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 "+i),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"),i.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!h.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 h.getValue("main."+this.locale+".dates.calendars.gregorian.days.format.short",e)},t.prototype.getWeek=function(e){var t=new Date(""+e).valueOf(),i=new Date(e.getFullYear(),0,1).valueOf(),a=t-i;return Math.ceil((a/864e5+new Date(i).getDay()+1)/7)},t.prototype.setTime=function(e,t){var i=e.getTimezoneOffset(),a=new Date(e.getTime()+t),s=a.getTimezoneOffset()-i;e.setTime(a.getTime()+864e5*s)},t.prototype.addMonths=function(e,t){var i=e.getDate();e.setDate(1),e.setMonth(e.getMonth()+t),e.setDate(Math.min(i,this.getMaxDays(e)))},t.prototype.addYears=function(e,t){var i=e.getDate();e.setDate(1),e.setFullYear(e.getFullYear()+t),e.setDate(Math.min(i,this.getMaxDays(e)))},t.prototype.getIdValue=function(e,t){var i;i=e?e.currentTarget:t;var a=this.globalize.formatDate(new Date(parseInt(""+i.getAttribute("id"),0)),{skeleton:"full"});return this.resetTime(this.globalize.parseDate(a,{skeleton:"full",type:"date"}))},t.prototype.selectDate=function(e,t,i){var a=i||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)),h.isNullOrUndefined(this.tbodyEle.querySelector("."+u))||o.removeClass([this.tbodyEle.querySelector("."+u)],u),h.isNullOrUndefined(this.tbodyEle.querySelector("."+p))||o.removeClass([this.tbodyEle.querySelector("."+p)],p),o.addClass([a],u),this.changedArgs={value:this.value},this.changeHandler(),this.ariaActivedescendent()},t.prototype.prevIconHandler=function(e){e?(i.EventHandler.remove(this.prevIcon,"click",this.navPrev),o.addClass([this.prevIcon],""+l),o.addClass([this.prevIcon],""+c),this.prevIcon.setAttribute("aria-disabled","true")):(i.EventHandler.remove(this.prevIcon,"click",this.navPrev),i.EventHandler.add(this.prevIcon,"click",this.navPrev,this),o.removeClass([this.prevIcon],""+l),o.removeClass([this.prevIcon],""+c),this.prevIcon.setAttribute("aria-disabled","false"))},t.prototype.renderDayCellEvent=function(e){h.extend(this.renderDaycellArg,{name:"renderDayCell"}),this.trigger("renderDayCell",e)},t.prototype.navigatedEvent=function(){h.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(){h.extend(this.changedArgs,{name:"change"}),h.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?(i.EventHandler.remove(this.nextIcon,"click",this.navNext),o.addClass([this.nextIcon],l),o.addClass([this.nextIcon],c),this.nextIcon.setAttribute("aria-disabled","true")):(i.EventHandler.remove(this.nextIcon,"click",this.navNext),i.EventHandler.add(this.nextIcon,"click",this.navNext,this),o.removeClass([this.nextIcon],l),o.removeClass([this.nextIcon],c),this.nextIcon.setAttribute("aria-disabled","false"))},t.prototype.compare=function(e,t,i){var a,s,r=t.getFullYear();return a=r,s=0,i&&(r-=r%i,a=r-r%i+i-1),e.getFullYear()>a?s=1:e.getFullYear()<r&&(s=-1),s},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,i,a=new Date(""+e);for(t=28,i=a.getMonth();a.getMonth()===i;)++t,a.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}(i.Component);n([i.Property(null)],v.prototype,"value",void 0),n([i.Property(new Date(1900,0,1))],v.prototype,"min",void 0),n([i.Property(new Date(2099,11,31))],v.prototype,"max",void 0),n([i.Property(0)],v.prototype,"firstDayOfWeek",void 0),n([i.Property("month")],v.prototype,"start",void 0),n([i.Property("month")],v.prototype,"depth",void 0),n([i.Property(!1)],v.prototype,"weekNumber",void 0),n([i.Event()],v.prototype,"created",void 0),n([i.Event()],v.prototype,"destroyed",void 0),n([i.Event()],v.prototype,"change",void 0),n([i.Event()],v.prototype,"navigated",void 0),n([i.Event()],v.prototype,"renderDayCell",void 0),v=n([a.NotifyPropertyChanges],v),t.Calendar=v,t.calendarBuilder=i.CreateBuilder(v)}.apply(t,a))&&(e.exports=s)},function(t,i){t.exports=e}])});
!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 i=t("object"==typeof exports?require("@syncfusion/ej2-base"):e["@syncfusion/ej2-base"]);for(var a in i)("object"==typeof exports?exports:e)[a]=i[a]}}(this,function(e){return function(e){function t(a){if(i[a])return i[a].exports;var s=i[a]={exports:{},id:a,loaded:!1};return e[a].call(s.exports,s,s.exports,t),s.loaded=!0,s.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){var a,s;a=[i,t,i(1)],void 0!==(s=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}(i)}.apply(t,a))&&(e.exports=s)},function(e,t,i){var a,s;a=[i,t,i(2)],void 0!==(s=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}(i)}.apply(t,a))&&(e.exports=s)},function(e,t,i){var a,s,r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function a(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(a.prototype=i.prototype,new a)}}(),n=this&&this.__decorate||function(e,t,i,a){var s,r=arguments.length,n=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,a);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(n=(r<3?s(n):r>3?s(t,i,n):s(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};a=[i,t,i(3),i(3),i(3),i(3),i(3)],void 0!==(s=function(e,t,i,a,s,o,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l="e-disabled",c="e-overlay",d="e-other-month",u="e-selected",p="e-focused-date",v=function(e){function t(t,i){var a=e.call(this,t,i)||this;return a.effect="",a.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"},a}return r(t,e),t.prototype.render=function(){this.globalize=new i.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),!h.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)},t.prototype.minMaxUpdate=function(){this.min<=this.max?o.removeClass([this.element],c):(this.setProperties({min:this.min},!0),o.addClass([this.element],c)),this.min=h.isNullOrUndefined(this.min)||!+this.min?this.min=new Date(1900,0,1):this.min,this.max=h.isNullOrUndefined(this.max)||!+this.max?this.max=new Date(2099,11,31):this.max,!h.isNullOrUndefined(this.value)&&this.value<=this.min&&this.min<=this.max?(this.setProperties({value:this.resetTime(this.min)},!0),this.changedArgs={value:this.value}):!h.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"},i={"aria-atomic":"true","aria-live":"assertive","aria-label":"title",role:"button"};this.headerEle=o.createElement("div",{className:"e-header"});var a=o.createElement("div",{className:"e-icon-container"});this.prevIcon=o.createElement("a",{className:"e-prev"}),s.isRippleEnabled&&this.prevIcon.classList.add("e-ripple-style"),o.attributes(this.prevIcon,e),this.nextIcon=o.createElement("a",{className:"e-next"}),s.isRippleEnabled&&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,i),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"})),a.appendChild(this.prevIcon),a.appendChild(this.nextIcon),this.headerEle.appendChild(a),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?h.getValue("days.stand-alone.short",s.getDefaultDateObject()):this.getCultureObjects(s.cldrData,""+this.locale);for(var i=0,a=Object.keys(e);i<a.length;i++){var r=a[i];t.push(h.getValue(r,e))}return t},t.prototype.contentHdr=function(){h.isNullOrUndefined(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 i=0;i<=6;i++)t+='<th class="">'+e[i]+"</th>";t="<tr>"+t+"</tr>",this.theadEle.innerHTML=t,this.table.appendChild(this.theadEle)},t.prototype.contentBody=function(){switch(h.isNullOrUndefined(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(){i.EventHandler.add(this.hdrTitleEle,"click",this.navTitle,this),this.keyboardModule=new a.KeyboardEvents(this.element,{eventName:"keydown",keyAction:this.keyActionHandle.bind(this),keyConfigs:this.keyConfigs})},t.prototype.keyActionHandle=function(e){var t=this.getViewNumber(this.currentView()),i=this.tbodyEle.querySelector("tr td.e-focused-date"),a=this.tbodyEle.querySelector("tr td.e-selected"),s=this.getViewNumber(this.depth),r=t===s&&this.getViewNumber(this.start)>=s;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(!h.isNullOrUndefined(i)||!h.isNullOrUndefined(a))if(r){var n=new Date(parseInt(""+(i||a).id,0));this.selectDate(e,this.resetTime(n),i||a)}else this.contentClick(null,--t,i||a);break;case"controlUp":this.title(),e.preventDefault();break;case"controlDown":h.isNullOrUndefined(i)&&(h.isNullOrUndefined(a)||r)||this.contentClick(null,--t,i||a),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 i=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=i;break;case 1:this.addMonths(this.currentDate,e),this.isMinMaxRange(this.currentDate)?(o.remove(this.tbodyEle),this.renderYears()):this.currentDate=i;break;case 0:this.addDay(this.currentDate,e),this.isMinMaxRange(this.currentDate)?(o.remove(this.tbodyEle),this.renderMonths()):this.currentDate=i}},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)),a=this.weekNumber?8:7,s=t.getMonth();this.titleUpdate(this.currentDate,"days");var r=t;for(t=new Date(r.getFullYear(),r.getMonth(),0,r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds());t.getDay()!==this.firstDayOfWeek;)this.setTime(t,-864e5);for(var n=0;n<42;++n){var h=o.createElement("td",{className:"e-cell"}),v=o.createElement("span");n%7==0&&this.weekNumber&&(v.textContent=""+this.getWeek(t),h.appendChild(v),o.addClass([h],"e-week-number"),e.push(h));var m=this.globalize.parseDate(this.globalize.formatDate(t,{skeleton:"full"}),{skeleton:"full"}),f=this.dayCell(t),g=this.globalize.formatDate(t,{type:"date",skeleton:"full"}),y=o.createElement("span");y.textContent=this.globalize.formatDate(t,{type:"date",skeleton:"d"});var D=this.min>t||this.max<t;D?(o.addClass([f],l),o.addClass([f],c)):y.setAttribute("title",""+g),s!==t.getMonth()&&o.addClass([f],d),0!==t.getDay()&&6!==t.getDay()||o.addClass([f],"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&&!f.classList.contains(u)&&(o.addClass([f],l),o.addClass([f],c));var w=f.classList.contains(d),k=f.classList.contains(l);k||i.EventHandler.add(f,"click",this.clickHandler,this),b.isDisabled&&+this.value==+b.date&&this.setProperties({value:null},!0),w||k||!this.getDateVal(t)?this.currentDate.getDate()!==t.getDate()||w||k?(this.currentDate>=this.max&&parseInt(f.id,0)===+this.max&&!w&&!k&&o.addClass([f],p),this.currentDate<=this.min&&parseInt(f.id,0)===+this.min&&!w&&!k&&o.addClass([f],p)):o.addClass([f],p):o.addClass([f],u),this.resetTime(m).valueOf()===this.resetTime(new Date).valueOf()&&o.addClass([f],"e-today"),f.appendChild(this.renderDaycellArg.element),e.push(f),this.addDay(t,1)}this.contentHdr(),this.renderTemplate(e,a,"e-month")},t.prototype.renderYears=function(){this.removeTheadEle();var e=[],t=h.isNullOrUndefined(this.value),a=new Date(""+this.currentDate),s=a.getMonth(),r=a.getFullYear(),n=a,c=n.getFullYear(),d=new Date(""+this.min).getFullYear(),v=new Date(""+this.min).getMonth(),m=new Date(""+this.max).getFullYear(),f=new Date(""+this.max).getMonth();n.setMonth(0),this.titleUpdate(this.currentDate,"months");this.min>n||this.max;n.setDate(1);for(var g=0;g<12;++g){var y=this.dayCell(n),D=o.createElement("span"),b=this.value&&this.value.getMonth()===n.getMonth(),w=this.value&&this.value.getFullYear()===r&&b;D.textContent=this.globalize.formatDate(n,{type:"date",skeleton:"MMM"}),this.min&&(c<d||g<v&&c===d)||this.max&&(c>m||g>f&&c>=m)?o.addClass([y],l):!t&&w?o.addClass([y],u):n.getMonth()===s&&this.currentDate.getMonth()===s&&o.addClass([y],p),n.setDate(1),n.setMonth(n.getMonth()+1),y.classList.contains(l)||i.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 a=t.getFullYear();this.hdrTitleEle.textContent=a-a%10+" - "+(a-a%10+9);for(var s=new Date(a-a%10-1,0,1),r=s.getFullYear(),n=0;n<12;++n){var c=r+n;t.setFullYear(c);var d=this.dayCell(t);o.attributes(d,{role:"gridcell"});var v=o.createElement("span");v.textContent=v.textContent=this.globalize.formatDate(t,{type:"date",skeleton:"y"}),c<new Date(""+this.min).getFullYear()||c>new Date(""+this.max).getFullYear()?o.addClass([d],l):h.isNullOrUndefined(this.value)||t.getFullYear()!==this.value.getFullYear()?t.getFullYear()!==this.currentDate.getFullYear()||d.classList.contains(l)||o.addClass([d],p):o.addClass([d],u),d.classList.contains(l)||i.EventHandler.add(d,"click",this.clickHandler,this),d.appendChild(v),e.push(d)}this.renderTemplate(e,4,"e-decade")},t.prototype.dayCell=function(e){var t=this.globalize.parseDate(this.globalize.formatDate(e,{skeleton:"full"}),{skeleton:"full"}),i=this.resetTime(t).valueOf(),a={className:"e-cell",attrs:{id:""+h.getUniqueID(""+i),"aria-selected":"false",role:"gridcell"}};return o.createElement("td",a)},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),i=Math.abs(t.getTimezoneOffset()-this.firstDay(e).getTimezoneOffset());return i&&t.setHours(this.firstDay(e).getHours()+i/60),t},t.prototype.removeTheadEle=function(){h.isNullOrUndefined(this.element.querySelectorAll(".e-content table thead")[0])||o.remove(this.theadEle)},t.prototype.renderTemplate=function(e,t,i){var a,r=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],[i]);for(var n=t,l=0,c=0;c<e.length/t;++c){for(a=o.createElement("tr",{attrs:{role:"row"}}),l=0+l;l<n;l++)e[l].classList.contains("e-week-number")||h.isNullOrUndefined(e[l].children[0])||(o.addClass([e[l].children[0]],["e-day"]),s.isRippleEnabled&&o.addClass([e[l].children[0]],"e-ripple-style")),a.appendChild(e[l]),!this.weekNumber&&6===l&&e[6].classList.contains(d)&&o.addClass([a],"e-month-hide"),this.weekNumber?41===l&&e[41].classList.contains(d)&&o.addClass([a],"e-month-hide"):35===l&&e[35].classList.contains(d)&&o.addClass([a],"e-month-hide");n+=t,l+=0,this.tbodyEle.appendChild(a)}this.table.querySelector("tbody").className=this.effect,this.iconHandler(),this.changedArgs={value:this.value},(r!==this.getViewNumber(this.currentView())||0===r&&r!==this.getViewNumber(this.currentView()))&&this.navigateHandler(),this.setAriaActivedescendant(),this.changeHandler()},t.prototype.clickHandler=function(e){var t=e.currentTarget;e.preventDefault();var i=this.getViewNumber(this.currentView());t.classList.contains(d)?(this.value=this.getIdValue(e,null),this.contentClick(e,0,null)):i===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?this.contentClick(e,1,null):2===i?this.contentClick(e,1,null):t.classList.contains(d)||0!==i?this.contentClick(e,0,t):this.selectDate(e,this.getIdValue(e,null),null)},t.prototype.contentClick=function(e,t,i){var a=this.getViewNumber(this.currentView()),s=this.getIdValue(e,i);switch(t){case 0:a===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?(o.remove(this.tbodyEle),this.currentDate=s,this.effect="e-zoomin",this.renderMonths()):(this.currentDate.setMonth(s.getMonth()),s.getMonth()>0&&this.currentDate.getMonth()!==s.getMonth()&&this.currentDate.setDate(0),this.currentDate.setFullYear(s.getFullYear()),this.effect="e-zoomin",o.remove(this.tbodyEle),this.renderMonths());break;case 1:a===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?this.selectDate(e,s,null):(this.currentDate.setFullYear(s.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 a=0,s=Object.keys(e);a<s.length;a++){switch(s[a]){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 i.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 a=new i.Internationalization(this.locale);switch(t){case"days":this.hdrTitleEle.textContent=a.formatDate(e,{type:"date",skeleton:"yMMMM"});break;case"months":this.hdrTitleEle.textContent=a.formatDate(e,{type:"date",skeleton:"y"})}},t.prototype.setActiveDescendant=function(){var e,t=this.tbodyEle.querySelector("tr td.e-focused-date"),i=this.tbodyEle.querySelector("tr td.e-selected"),a=this.globalize.formatDate(this.currentDate,{type:"date",skeleton:"full"});return(i||t)&&((t||i).setAttribute("aria-selected","true"),(t||i).setAttribute("aria-label","The current focused date is "+a),e=(t||i).getAttribute("id")),e},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"),i.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(),this.table.focus()},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(),this.table.focus()},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(),this.table.focus()},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!h.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 h.getValue("main."+this.locale+".dates.calendars.gregorian.days.format.short",e)},t.prototype.getWeek=function(e){var t=new Date(""+e).valueOf(),i=new Date(e.getFullYear(),0,1).valueOf(),a=t-i;return Math.ceil((a/864e5+new Date(i).getDay()+1)/7)},t.prototype.setTime=function(e,t){var i=e.getTimezoneOffset(),a=new Date(e.getTime()+t),s=a.getTimezoneOffset()-i;e.setTime(a.getTime()+864e5*s)},t.prototype.addMonths=function(e,t){var i=e.getDate();e.setDate(1),e.setMonth(e.getMonth()+t),e.setDate(Math.min(i,this.getMaxDays(e)))},t.prototype.addYears=function(e,t){var i=e.getDate();e.setDate(1),e.setFullYear(e.getFullYear()+t),e.setDate(Math.min(i,this.getMaxDays(e)))},t.prototype.getIdValue=function(e,t){var i;i=e?e.currentTarget:t;var a=this.globalize.formatDate(new Date(parseInt(""+i.getAttribute("id"),0)),{skeleton:"full"});return this.resetTime(this.globalize.parseDate(a,{skeleton:"full",type:"date"}))},t.prototype.selectDate=function(e,t,i){var a=i||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)),h.isNullOrUndefined(this.tbodyEle.querySelector("."+u))||o.removeClass([this.tbodyEle.querySelector("."+u)],u),h.isNullOrUndefined(this.tbodyEle.querySelector("."+p))||o.removeClass([this.tbodyEle.querySelector("."+p)],p),o.addClass([a],u),this.changedArgs={value:this.value},this.changeHandler()},t.prototype.setAriaActivedescendant=function(){o.attributes(this.table,{"aria-activedescendant":""+this.setActiveDescendant()})},t.prototype.prevIconHandler=function(e){e?(i.EventHandler.remove(this.prevIcon,"click",this.navPrev),o.addClass([this.prevIcon],""+l),o.addClass([this.prevIcon],""+c),this.prevIcon.setAttribute("aria-disabled","true")):(i.EventHandler.remove(this.prevIcon,"click",this.navPrev),i.EventHandler.add(this.prevIcon,"click",this.navPrev,this),o.removeClass([this.prevIcon],""+l),o.removeClass([this.prevIcon],""+c),this.prevIcon.setAttribute("aria-disabled","false"))},t.prototype.renderDayCellEvent=function(e){h.extend(this.renderDaycellArg,{name:"renderDayCell"}),this.trigger("renderDayCell",e)},t.prototype.navigatedEvent=function(){h.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(){h.extend(this.changedArgs,{name:"change"}),h.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?(i.EventHandler.remove(this.nextIcon,"click",this.navNext),o.addClass([this.nextIcon],l),o.addClass([this.nextIcon],c),this.nextIcon.setAttribute("aria-disabled","true")):(i.EventHandler.remove(this.nextIcon,"click",this.navNext),i.EventHandler.add(this.nextIcon,"click",this.navNext,this),o.removeClass([this.nextIcon],l),o.removeClass([this.nextIcon],c),this.nextIcon.setAttribute("aria-disabled","false"))},t.prototype.compare=function(e,t,i){var a,s,r=t.getFullYear();return a=r,s=0,i&&(r-=r%i,a=r-r%i+i-1),e.getFullYear()>a?s=1:e.getFullYear()<r&&(s=-1),s},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,i,a=new Date(""+e);for(t=28,i=a.getMonth();a.getMonth()===i;)++t,a.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}(i.Component);n([i.Property(null)],v.prototype,"value",void 0),n([i.Property(new Date(1900,0,1))],v.prototype,"min",void 0),n([i.Property(new Date(2099,11,31))],v.prototype,"max",void 0),n([i.Property(0)],v.prototype,"firstDayOfWeek",void 0),n([i.Property("month")],v.prototype,"start",void 0),n([i.Property("month")],v.prototype,"depth",void 0),n([i.Property(!1)],v.prototype,"weekNumber",void 0),n([i.Event()],v.prototype,"created",void 0),n([i.Event()],v.prototype,"destroyed",void 0),n([i.Event()],v.prototype,"change",void 0),n([i.Event()],v.prototype,"navigated",void 0),n([i.Event()],v.prototype,"renderDayCell",void 0),v=n([a.NotifyPropertyChanges],v),t.Calendar=v,t.calendarBuilder=i.CreateBuilder(v)}.apply(t,a))&&(e.exports=s)},function(t,i){t.exports=e}])});

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

import { NotifyPropertyChanges, KeyboardEvents } from '@syncfusion/ej2-base';
import { cldrData, getDefaultDateObject } from '@syncfusion/ej2-base';
import { cldrData, getDefaultDateObject, isRippleEnabled } from '@syncfusion/ej2-base';
import { createElement, removeClass, remove, addClass, attributes } from '@syncfusion/ej2-base';

@@ -47,2 +47,3 @@ import { isNullOrUndefined, getValue, getUniqueID, extend } from '@syncfusion/ej2-base';

var LINK = 'e-day';
var CELL = 'e-cell';
var WEEKHEADER = 'e-week-header';

@@ -102,8 +103,11 @@ var ZOOMIN = 'e-zoomin';

}
};
Calendar.prototype.minMaxUpdate = function () {
if (!(this.min <= this.max)) {
this.setProperties({ min: this.min }, true);
this.setProperties({ max: new Date(2099, 11, 31) }, true);
addClass([this.element], OVERLAY);
}
};
Calendar.prototype.minMaxUpdate = function () {
else {
removeClass([this.element], OVERLAY);
}
this.min = isNullOrUndefined(this.min) || !(+this.min) ? this.min = new Date(1900, 0, 1) : this.min;

@@ -152,6 +156,10 @@ this.max = isNullOrUndefined(this.max) || !(+this.max) ? this.max = new Date(2099, 11, 31) : this.max;

this.prevIcon = createElement('a', { className: '' + PREVICON });
this.prevIcon.classList.add(RIPPLESTYLE);
if (isRippleEnabled) {
this.prevIcon.classList.add(RIPPLESTYLE);
}
attributes(this.prevIcon, ariaPrevAttrs);
this.nextIcon = createElement('a', { className: '' + NEXTICON });
this.nextIcon.classList.add(RIPPLESTYLE);
if (isRippleEnabled) {
this.nextIcon.classList.add(RIPPLESTYLE);
}
attributes(this.nextIcon, ariaNextAttrs);

@@ -193,3 +201,3 @@ this.hdrTitleEle = createElement('a', { className: '' + LINK + ' ' + TITLE, attrs: {} });

Calendar.prototype.contentHdr = function () {
if (this.element.querySelectorAll('.e-content .e-week-header')[0]) {
if (!isNullOrUndefined(this.element.querySelectorAll('.e-content .e-week-header')[0])) {
remove(this.element.querySelectorAll('.e-content .e-week-header')[0]);

@@ -216,3 +224,3 @@ }

Calendar.prototype.contentBody = function () {
if (this.element.querySelectorAll('.e-content tbody')[0]) {
if (!isNullOrUndefined(this.element.querySelectorAll('.e-content tbody')[0])) {
remove(this.element.querySelectorAll('.e-content tbody')[0]);

@@ -394,3 +402,3 @@ }

for (var day = 0; day < cellsCount; ++day) {
var weekEle = createElement('td');
var weekEle = createElement('td', { className: CELL });
var weekAnchor = createElement('span');

@@ -407,3 +415,3 @@ if (day % 7 === 0 && this.weekNumber) {

var dayLink = createElement('span');
dayLink.textContent = localDate.getDate().toString();
dayLink.textContent = this.globalize.formatDate(localDate, { type: 'date', skeleton: 'd' });
var disabled = (this.min > localDate) || (this.max < localDate);

@@ -538,3 +546,3 @@ if (disabled) {

var dayLink = createElement('span');
dayLink.textContent = year.toString();
dayLink.textContent = dayLink.textContent = this.globalize.formatDate(localDate, { type: 'date', skeleton: 'y' });
if (year < new Date('' + this.min).getFullYear() || year > new Date('' + this.max).getFullYear()) {

@@ -562,3 +570,6 @@ addClass([tdEle], DISABLED);

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

@@ -578,3 +589,3 @@ Calendar.prototype.firstDay = function (date) {

Calendar.prototype.removeTheadEle = function () {
if (this.element.querySelectorAll('.e-content table thead')[0]) {
if (!isNullOrUndefined(this.element.querySelectorAll('.e-content table thead')[0])) {
remove(this.theadEle);

@@ -598,4 +609,7 @@ }

for (rowIterator = 0 + rowIterator; rowIterator < row; rowIterator++) {
if (!elements[rowIterator].classList.contains('e-week-number') && elements[rowIterator].children[0]) {
addClass([elements[rowIterator].children[0]], [LINK, RIPPLESTYLE]);
if (!elements[rowIterator].classList.contains('e-week-number') && !isNullOrUndefined(elements[rowIterator].children[0])) {
addClass([elements[rowIterator].children[0]], [LINK]);
if (isRippleEnabled) {
addClass([elements[rowIterator].children[0]], RIPPLESTYLE);
}
}

@@ -627,3 +641,3 @@ trEle.appendChild(elements[rowIterator]);

}
this.ariaActivedescendent();
this.setAriaActivedescendant();
this.changeHandler();

@@ -764,3 +778,4 @@ };

};
Calendar.prototype.ariaActivedescendent = function () {
Calendar.prototype.setActiveDescendant = function () {
var id;
var focusedEle = this.tbodyEle.querySelector('tr td.e-focused-date');

@@ -772,6 +787,5 @@ var selectedEle = this.tbodyEle.querySelector('tr td.e-selected');

(focusedEle || selectedEle).setAttribute('aria-label', 'The current focused date is ' + '' + title);
attributes(this.table, {
'aria-activedescendant': '' + (focusedEle || selectedEle).getAttribute('id')
});
id = (focusedEle || selectedEle).getAttribute('id');
}
return id;
};

@@ -821,2 +835,3 @@ Calendar.prototype.iconHandler = function () {

this.title();
this.table.focus();
};

@@ -844,2 +859,3 @@ Calendar.prototype.previous = function () {

this.triggerNavigate();
this.table.focus();
};

@@ -867,2 +883,3 @@ Calendar.prototype.next = function () {

this.triggerNavigate();
this.table.focus();
};

@@ -957,4 +974,8 @@ Calendar.prototype.navigateTo = function (view, date) {

this.changeHandler();
this.ariaActivedescendent();
};
Calendar.prototype.setAriaActivedescendant = function () {
attributes(this.table, {
'aria-activedescendant': '' + this.setActiveDescendant()
});
};
Calendar.prototype.prevIconHandler = function (disabled) {

@@ -961,0 +982,0 @@ if (disabled) {

{
"name": "@syncfusion/ej2-calendars",
"version": "1.0.14",
"version": "1.0.16",
"description": "Essential JS 2 Calendar Components",

@@ -9,3 +9,3 @@ "author": "Syncfusion Inc.",

"dependencies": {
"@syncfusion/ej2-base": "^1.0.14",
"@syncfusion/ej2-base": "^1.0.16",
"intl": "^1.2.5"

@@ -12,0 +12,0 @@ },

@@ -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, attributes } from '@syncfusion/ej2-base';import { isNullOrUndefined, getValue, getUniqueID, extend } from '@syncfusion/ej2-base';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, isRippleEnabled } from '@syncfusion/ej2-base';import { createElement, removeClass, remove, addClass, attributes } from '@syncfusion/ej2-base';import { isNullOrUndefined, getValue, getUniqueID, extend } from '@syncfusion/ej2-base';import { CalendarHelper } from './calendar-builder';
import {CalendarView,ChangedEventArgs,NavigatedEventArgs,RenderDayCellEventArgs} from "./calendar";

@@ -38,3 +38,3 @@ import {ComponentModel} from '@syncfusion/ej2-base';

* With help of this property, initial view can be changed to year or decade view.
* @default 'month'
* @default month
*/

@@ -46,3 +46,3 @@ start?: CalendarView;

* depth view should be smaller than the start view, so that it will restricts the view navigation.
* @default 'month'
* @default month
*/

@@ -49,0 +49,0 @@ depth?: CalendarView;

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

import { CalendarHelper } from './calendar-builder';
/**
* Specifies the view of the calendar
*/
export declare type CalendarView = 'month' | 'year' | 'decade';

@@ -66,3 +69,3 @@ /**

* With help of this property, initial view can be changed to year or decade view.
* @default 'month'
* @default month
*/

@@ -73,3 +76,3 @@ start: CalendarView;

* depth view should be smaller than the start view, so that it will restricts the view navigation.
* @default 'month'
* @default month
*/

@@ -166,3 +169,3 @@ depth: CalendarView;

private titleUpdate(date, view);
private ariaActivedescendent();
protected setActiveDescendant(): string;
private iconHandler();

@@ -187,3 +190,3 @@ /**

*/
navigateTo(view: string, date: Date): void;
navigateTo(view: CalendarView, date: Date): void;
/**

@@ -202,2 +205,3 @@ * Gets the current view of the calendar.

private selectDate(e, date, element);
private setAriaActivedescendant();
private prevIconHandler(disabled);

@@ -204,0 +208,0 @@ protected renderDayCellEvent(args: RenderDayCellEventArgs): void;

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

var LINK = 'e-day';
var CELL = 'e-cell';
var WEEKHEADER = 'e-week-header';

@@ -99,8 +100,11 @@ var ZOOMIN = 'e-zoomin';

}
};
Calendar.prototype.minMaxUpdate = function () {
if (!(this.min <= this.max)) {
this.setProperties({ min: this.min }, true);
this.setProperties({ max: new Date(2099, 11, 31) }, true);
ej2_base_4.addClass([this.element], OVERLAY);
}
};
Calendar.prototype.minMaxUpdate = function () {
else {
ej2_base_4.removeClass([this.element], OVERLAY);
}
this.min = ej2_base_5.isNullOrUndefined(this.min) || !(+this.min) ? this.min = new Date(1900, 0, 1) : this.min;

@@ -149,6 +153,10 @@ this.max = ej2_base_5.isNullOrUndefined(this.max) || !(+this.max) ? this.max = new Date(2099, 11, 31) : this.max;

this.prevIcon = ej2_base_4.createElement('a', { className: '' + PREVICON });
this.prevIcon.classList.add(RIPPLESTYLE);
if (ej2_base_3.isRippleEnabled) {
this.prevIcon.classList.add(RIPPLESTYLE);
}
ej2_base_4.attributes(this.prevIcon, ariaPrevAttrs);
this.nextIcon = ej2_base_4.createElement('a', { className: '' + NEXTICON });
this.nextIcon.classList.add(RIPPLESTYLE);
if (ej2_base_3.isRippleEnabled) {
this.nextIcon.classList.add(RIPPLESTYLE);
}
ej2_base_4.attributes(this.nextIcon, ariaNextAttrs);

@@ -190,3 +198,3 @@ this.hdrTitleEle = ej2_base_4.createElement('a', { className: '' + LINK + ' ' + TITLE, attrs: {} });

Calendar.prototype.contentHdr = function () {
if (this.element.querySelectorAll('.e-content .e-week-header')[0]) {
if (!ej2_base_5.isNullOrUndefined(this.element.querySelectorAll('.e-content .e-week-header')[0])) {
ej2_base_4.remove(this.element.querySelectorAll('.e-content .e-week-header')[0]);

@@ -213,3 +221,3 @@ }

Calendar.prototype.contentBody = function () {
if (this.element.querySelectorAll('.e-content tbody')[0]) {
if (!ej2_base_5.isNullOrUndefined(this.element.querySelectorAll('.e-content tbody')[0])) {
ej2_base_4.remove(this.element.querySelectorAll('.e-content tbody')[0]);

@@ -391,3 +399,3 @@ }

for (var day = 0; day < cellsCount; ++day) {
var weekEle = ej2_base_4.createElement('td');
var weekEle = ej2_base_4.createElement('td', { className: CELL });
var weekAnchor = ej2_base_4.createElement('span');

@@ -404,3 +412,3 @@ if (day % 7 === 0 && this.weekNumber) {

var dayLink = ej2_base_4.createElement('span');
dayLink.textContent = localDate.getDate().toString();
dayLink.textContent = this.globalize.formatDate(localDate, { type: 'date', skeleton: 'd' });
var disabled = (this.min > localDate) || (this.max < localDate);

@@ -535,3 +543,3 @@ if (disabled) {

var dayLink = ej2_base_4.createElement('span');
dayLink.textContent = year.toString();
dayLink.textContent = dayLink.textContent = this.globalize.formatDate(localDate, { type: 'date', skeleton: 'y' });
if (year < new Date('' + this.min).getFullYear() || year > new Date('' + this.max).getFullYear()) {

@@ -559,3 +567,6 @@ ej2_base_4.addClass([tdEle], DISABLED);

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

@@ -575,3 +586,3 @@ Calendar.prototype.firstDay = function (date) {

Calendar.prototype.removeTheadEle = function () {
if (this.element.querySelectorAll('.e-content table thead')[0]) {
if (!ej2_base_5.isNullOrUndefined(this.element.querySelectorAll('.e-content table thead')[0])) {
ej2_base_4.remove(this.theadEle);

@@ -595,4 +606,7 @@ }

for (rowIterator = 0 + rowIterator; rowIterator < row; rowIterator++) {
if (!elements[rowIterator].classList.contains('e-week-number') && elements[rowIterator].children[0]) {
ej2_base_4.addClass([elements[rowIterator].children[0]], [LINK, RIPPLESTYLE]);
if (!elements[rowIterator].classList.contains('e-week-number') && !ej2_base_5.isNullOrUndefined(elements[rowIterator].children[0])) {
ej2_base_4.addClass([elements[rowIterator].children[0]], [LINK]);
if (ej2_base_3.isRippleEnabled) {
ej2_base_4.addClass([elements[rowIterator].children[0]], RIPPLESTYLE);
}
}

@@ -624,3 +638,3 @@ trEle.appendChild(elements[rowIterator]);

}
this.ariaActivedescendent();
this.setAriaActivedescendant();
this.changeHandler();

@@ -761,3 +775,4 @@ };

};
Calendar.prototype.ariaActivedescendent = function () {
Calendar.prototype.setActiveDescendant = function () {
var id;
var focusedEle = this.tbodyEle.querySelector('tr td.e-focused-date');

@@ -769,6 +784,5 @@ var selectedEle = this.tbodyEle.querySelector('tr td.e-selected');

(focusedEle || selectedEle).setAttribute('aria-label', 'The current focused date is ' + '' + title);
ej2_base_4.attributes(this.table, {
'aria-activedescendant': '' + (focusedEle || selectedEle).getAttribute('id')
});
id = (focusedEle || selectedEle).getAttribute('id');
}
return id;
};

@@ -818,2 +832,3 @@ Calendar.prototype.iconHandler = function () {

this.title();
this.table.focus();
};

@@ -841,2 +856,3 @@ Calendar.prototype.previous = function () {

this.triggerNavigate();
this.table.focus();
};

@@ -864,2 +880,3 @@ Calendar.prototype.next = function () {

this.triggerNavigate();
this.table.focus();
};

@@ -954,4 +971,8 @@ Calendar.prototype.navigateTo = function (view, date) {

this.changeHandler();
this.ariaActivedescendent();
};
Calendar.prototype.setAriaActivedescendant = function () {
ej2_base_4.attributes(this.table, {
'aria-activedescendant': '' + this.setActiveDescendant()
});
};
Calendar.prototype.prevIconHandler = function (disabled) {

@@ -958,0 +979,0 @@ if (disabled) {

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 too big to display

Sorry, the diff of this file is not supported yet

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc