CoreFiles by mySites.guru
calendar.min.js1 lines, 23,736 bytes, from Joomla_3.7.0-beta2-Beta-Full_Package.zip
Raw History Compare with 3.7.0-beta1
md5
d49dbee4284dd9acc20a7e34e89e3c9c
sha1
13ac4363965907d84c483cd4c3c35894016ca90c
sha256
de365e5b09a0fe1133e8426bbe4434c0461b366ccc7127adfeb08e10c77d5a95
!function(a,b){"use strict";Date.convertNumbers=function(a){var a=a.toString();if("[object Array]"===Object.prototype.toString.call(JoomlaCalLocale.localLangNumbers))for(var b=0;b<JoomlaCalLocale.localLangNumbers.length;b++)a=a.replace(new RegExp(b,"g"),JoomlaCalLocale.localLangNumbers[b]);return a},Date.toEnglish=function(a){a=this.toString();for(var b=[0,1,2,3,4,5,6,7,8,9],c=0;c<10;c++)a=a.replace(new RegExp(b[c],"g"),c);return a};var c=function(a){if(!a)throw new Error("Calendar setup failed:\n  No valid element found, Please check your code");if("function"!=typeof Date.parseFieldDate)throw new Error("Calendar setup failed:\n  No valid date helper, Please check your code");if(a._joomlaCalendar)throw new Error("JoomlaCalendar instance already exists for the element");if(a._joomlaCalendar=this,this.writable=!0,this.params={},this.element=a,this.inputField=a.getElementsByTagName("input")[0],this.button=a.getElementsByTagName("button")[0],!this.inputField)throw new Error("Calendar setup failed:\n  No valid input found, Please check your code");this.params={debug:!1,clicked:!1,element:{style:{display:"none"}},writable:!0};var c=this,d=this.button,e={inputField:this.inputField,dateType:JoomlaCalLocale.dateType?JoomlaCalLocale.dateType:"gregorian",direction:void 0!=b.dir?b.dir:b.getElementsByTagName("html")[0].getAttribute("dir"),firstDayOfWeek:d.getAttribute("data-firstday")?parseInt(d.getAttribute("data-firstday")):0,dateFormat:"%Y-%m-%d %H:%M:%S",weekend:JoomlaCalLocale.weekend?JoomlaCalLocale.weekend:[0,6],minYear:JoomlaCalLocale.minYear?JoomlaCalLocale.minYear:1900,maxYear:JoomlaCalLocale.maxYear?JoomlaCalLocale.maxYear:2100,minYearTmp:d.getAttribute("data-min-year"),maxYearTmp:d.getAttribute("data-max-year"),weekendTmp:d.getAttribute("data-weekend"),time24:!0,showsOthers:1===parseInt(d.getAttribute("data-show-others")),showsTime:!0,weekNumbers:1===parseInt(d.getAttribute("data-week-numbers")),showsTodayBtn:!0,compressedHeader:1===parseInt(d.getAttribute("data-only-months-nav"))};d.getAttribute("data-dayformat")&&(e.dateFormat=d.getAttribute("data-dayformat")?d.getAttribute("data-dayformat"):"%Y-%m-%d %H:%M:%S"),d.getAttribute("data-time-24")&&(e.time24=24===parseInt(d.getAttribute("data-time-24"))),d.getAttribute("data-show-time")&&(e.showsTime=1===parseInt(d.getAttribute("data-show-time"))),d.getAttribute("data-today-btn")&&(e.showsTodayBtn=1===parseInt(d.getAttribute("data-today-btn")));for(var h in e)this.params[h]=e[h];f(c.params.minYearTmp)&&(c.params.minYear=g(parseInt(c.params.minYearTmp),c.params.dateType)),f(c.params.maxYearTmp)&&(c.params.maxYear=g(parseInt(c.params.maxYearTmp),c.params.dateType)),"undefined"!==c.params.weekendTmp&&(c.params.weekend=c.params.weekendTmp.split(",").map(function(a){return parseInt(a,10)})),this._dayMouseDown=function(a){return c._handleDayMouseDown(a)},this._calKeyEvent=function(a){return c._handleCalKeyEvent(a)},this._documentClick=function(a){return c._handleDocumentClick(a)},this.checkInputs(),this.inputField.getAttribute("readonly")||(this._create(),this._bindEvents())};c.prototype.checkInputs=function(){var a=Date.parseFieldDate(this.inputField.getAttribute("data-alt-value"),this.params.dateFormat,"gregorian");this.inputField.value.length?(this.date=a,this.inputField.value=a.print(this.params.dateFormat,this.params.dateType,!0)):this.date=new Date},c.prototype.updateTime=function(a,b,c){var d=this,e=d.date,f=d.date.getLocalDate(d.params.dateType),g=d.date.getLocalMonth(d.params.dateType),h=d.date.getLocalFullYear(d.params.dateType),i=this.inputField.parentNode.parentNode.querySelectorAll(".time-ampm")[0];d.params.time24||(/pm/i.test(i.value)&&a<12?a=parseInt(a)+12:/am/i.test(i.value)&&12==a&&(a=0)),e.setHours(a),e.setMinutes(parseInt(b,10)),e.setSeconds(e.getSeconds()),e.setLocalFullYear(d.params.dateType,h),e.setLocalMonth(d.params.dateType,g),e.setLocalDate(d.params.dateType,f),d.dateClicked=!1,this.callHandler()},c.prototype.setDate=function(a){a.equalsTo(this.date)||(this.date=a,this.processCalendar(this.params.firstDayOfWeek,a))},c.prototype.moveCursorBy=function(a){var b=new Date(this.date);b.setDate(b.getDate()-a),this.setDate(b)},c.prototype.resetSelected=function(a){for(var b=a.options,c=b.length;c--;){var d=b[c];d.selected&&(d.selected=!1)}},c.prototype.callHandler=function(){"gregorian"==this.params.dateType?(this.inputField.setAttribute("data-alt-value",this.date.print(this.params.dateFormat,this.params.dateType,!1)),this.inputField.getAttribute("data-alt-value")&&"0000-00-00 00:00:00"!=this.inputField.getAttribute("data-alt-value")&&(this.inputField.value=this.date.print(this.params.dateFormat,this.params.dateType,!0))):(this.inputField.setAttribute("data-alt-value",this.date.print(this.params.dateFormat,"gregorian",!1)),this.inputField.setAttribute("data-local-value",this.date.print(this.params.dateFormat,this.params.dateType,!1)),this.inputField.value=this.date.print(this.params.dateFormat,this.params.dateType,!0)),"function"==typeof this.inputField.onchange&&this.inputField.onchange(),this.dateClicked&&"function"==typeof this.params.onUpdate&&this.params.onUpdate(this),this.dateClicked?this.close():this.processCalendar()},c.prototype.close=function(){b.activeElement.blur(),this.hide()},c.prototype.show=function(){if(navigator.appName.indexOf("Internet Explorer")!=-1){var c=navigator.appVersion.indexOf("MSIE 9")==-1&&navigator.appVersion.indexOf("MSIE 1")==-1;if(c&&a.jQuery&&jQuery().chosen)for(var d=this.element.getElementsByTagName("select"),e=0;e<d.length;e++)jQuery(d[e]).chosen("destroy")}this.checkInputs(),this.inputField.focus();for(var f=this.table.getElementsByTagName("tr"),e=f.length;e>0;)for(var g=f[--e],h=g.getElementsByTagName("td"),i=h.length;i>0;){h[--i]}this.dropdownElement.style.display="block",this.hidden=!1,b.addEventListener("keydown",this._calKeyEvent,!0),b.addEventListener("keypress",this._calKeyEvent,!0),b.addEventListener("mousedown",this._documentClick,!0);var k=this.element.querySelector(".js-calendar");a.innerHeight+a.scrollY<k.getBoundingClientRect().bottom+20&&(k.style.marginTop=-(k.getBoundingClientRect().height+this.inputField.getBoundingClientRect().height)+"px"),this.processCalendar()},c.prototype.hide=function(){b.removeEventListener("keydown",this._calKeyEvent,!0),b.removeEventListener("keypress",this._calKeyEvent,!0),b.removeEventListener("mousedown",this._documentClick,!0),this.dropdownElement.style.display="none",this.hidden=!0},c.prototype._handleDocumentClick=function(a){var c=a.target;if(null!==c&&!c.classList.contains("time"))for(;null!==c&&c!==this.element;c=c.parentNode);if(null===c)return b.activeElement.blur(),this.hide(),d(a)},c.prototype._handleDayMouseDown=function(a){var b=this,c=a.currentTarget,e=a.target||a.srcElement;if("TD"!==c.nodeName){var f=c.getParent("TD");"TD"===f.nodeName?c=f:(c=c.getParent("TD"),c.classList.contains("js-calendar")&&(c=c.getElementsByTagName("table")[0]))}else if(!e.classList.contains("js-btn")&&!c.classList.contains("day")&&!c.classList.contains("title"))return;if(!c||c.disabled)return!1;if("undefined"==typeof c.navtype||300!=c.navtype){50==c.navtype&&(c._current=c.innerHTML),e!=c&&e.parentNode!=c||b.cellClick(c,a);var g=null;"undefined"!=typeof c.month&&(g=c),"undefined"!=typeof c.parentNode.month&&(g=c.parentNode);var h=null;if(g)h=new Date(b.date),g.month!=h.getLocalMonth(b.params.dateType)&&(h.setLocalMonth(b.params.dateType,g.month),b.setDate(h),b.dateClicked=!1,this.callHandler());else{var i=null;"undefined"!=typeof c.year&&(i=e),"undefined"!=typeof c.parentNode.year&&(i=e.parentNode),i&&(h=new Date(b.date),i.year!=h.getLocalFullYear(b.params.dateType)&&(h.setFullYear(b.params.dateType,i.year),b.setDate(h),b.dateClicked=!1,this.callHandler()))}}return d(a)},c.prototype.cellClick=function(a,b){var c=this,d=!1,e=!1,f=null;if("undefined"==typeof a.navtype){c.currentDateEl&&(a.classList.add("selected"),c.currentDateEl=a.caldate,d=c.currentDateEl==a.caldate,d||(c.currentDateEl=a.caldate)),c.date.setLocalDateOnly("gregorian",a.caldate),f=c.date;var g=!(c.dateClicked=!a.otherMonth);c.currentDateEl&&(e=!a.disabled),g&&this.processCalendar()}else{if(100==a.navtype)return a.classList.remove("hilite"),this.inputField.setAttribute("data-alt-value","0000-00-00 00:00:00"),this.inputField.setAttribute("value",""),this.inputField.value="",void this.close();if(200==a.navtype)return void this.close();if(f=new Date(c.date),0==a.navtype)return c.date.setLocalDateOnly("gregorian",new Date),c.dateClicked=!0,this.callHandler(),void this.close();c.dateClicked=!1;var h=f.getOtherFullYear(c.params.dateType),i=f.getLocalMonth(c.params.dateType);switch(a.navtype){case 400:break;case-2:c.params.compressedHeader||h>c.params.minYear&&f.setOtherFullYear(c.params.dateType,h-1);break;case-1:var j=f.getLocalDate(c.params.dateType);if(i>0){var k=f.getLocalMonthDays(c.params.dateType,i-1);j>k&&f.setLocalDate(c.params.dateType,k),f.setLocalMonth(c.params.dateType,i-1)}else if(h-- >c.params.minYear){f.setOtherFullYear(c.params.dateType,h);var k=f.getLocalMonthDays(c.params.dateType,11);j>k&&f.setLocalDate(c.params.dateType,k),f.setLocalMonth(c.params.dateType,11)}break;case 1:var j=f.getLocalDate(c.params.dateType);if(i<11){var k=f.getLocalMonthDays(c.params.dateType,i+1);j>k&&f.setLocalDate(c.params.dateType,k),f.setLocalMonth(c.params.dateType,i+1)}else if(h<c.params.maxYear){f.setOtherFullYear(c.params.dateType,h+1);var k=f.getLocalMonthDays(c.params.dateType,0);j>k&&f.setLocalDate(c.params.dateType,k),f.setLocalMonth(c.params.dateType,0)}break;case 2:c.params.compressedHeader||h<c.params.maxYear&&f.setOtherFullYear(c.params.dateType,h+1);break;case 0:}f.equalsTo(c.date)?0==a.navtype&&(e=d=!0):(this.setDate(f),e=!0)}e&&(c.params.showsTime&&(this.dateClicked=!1),b&&this.callHandler()),a.classList.remove("hilite"),d&&!c.params.showsTime&&(c.dateClicked=!1,b&&this.close())},c.prototype._handleCalKeyEvent=function(a){var b=this,c=parseInt(a.keyCode);if(a.target!==this.inputField||13!==c&&9!==c||a.shiftKey||(""!=this.inputField.value?(b.date=Date.parseFieldDate(this.inputField.value,b.params.dateFormat,b.params.dateType),this.processCalendar(b.params.firstDayOfWeek,b.date),this.cellClick(b.currentDateEl,a)):(this.inputField.value="",this.inputField.setAttribute("value",""),this.inputField.setAttribute("data-alt-value","0000-00-00 00:00:00")),this.close()),"rtl"==b.params.direction&&(37==c?c=39:39==c&&(c=37)),a.shiftKey&&32===c&&this.cellClick(b._nav_now,a),27===c&&this.close(),a.shiftKey&&13===c&&(this.params.showsTime&&(this.dateClicked=!1),this.cellClick(b.currentDateEl,a)),38===c&&this.moveCursorBy(7),40===c&&this.moveCursorBy(-7),37===c&&this.moveCursorBy(1),39===c&&this.moveCursorBy(-1),a.target===this.inputField&&!(c>48||c<57||186===c||189===c||190===c||32===c))return d(a)},c.prototype._create=function(){var a=this,b=this.element,c=e("table"),d=e("div");this.table=c,c.className="table",c.cellSpacing=0,c.cellPadding=0,c.style.marginBottom=0,this.dropdownElement=d,b.appendChild(d),this.params.direction&&(d.style.direction=this.params.direction),d.className="js-calendar",d.style.position="absolute",d.style.boxShadow="0px 0px 70px 0px rgba(0,0,0,0.67)",d.style.minWidth=this.inputField.width,d.style.padding="0",d.style.display="none",d.style.left="auto",d.style.top="auto",d.style.zIndex=1060,d.style.borderRadius="20px",this.wrapper=e("div"),this.wrapper.className="calendar-container",d.appendChild(this.wrapper),this.wrapper.appendChild(c);var f=e("thead",c);f.className="calendar-header";var g=null,h=null,i=this,j=function(b,c,d,f,j,k){f=f?f:"td",k=k?'class="'+k+'"':"",j=j?j:{},g=e(f,h),g.colSpan=c;for(var l in j)g.style[l]=j[l];return 0!=d&&Math.abs(d)<=2&&(g.className+=" nav"),g.addEventListener("mousedown",a._dayMouseDown,!0),g.calendar=i,g.navtype=d,0!=d&&Math.abs(d)<=2?g.innerHTML="<a "+k+" style='display:inline;padding:2px 6px;cursor:pointer;text-decoration:none;' unselectable='on'>"+b+"</a>":g.innerHTML="<div unselectable='on'"+k+">"+b+"</div>",g};this.params.compressedHeader===!1&&(h=e("tr",f),h.className="calendar-head-row",this._nav_py=j("&lsaquo;",1,-2,"",{"text-align":"center","font-size":"2em","line-height":"1em"},"js-btn btn-prev-year"),this.title=j('<div style="text-align:center;font-size:1.2em"><span></span></div>',this.params.weekNumbers?6:5,300),this.title.className="title",this._nav_ny=j(" &rsaquo;",1,2,"",{"text-align":"center","font-size":"2em","line-height":"1em"},"js-btn btn-next-year")),h=e("tr",f),h.className="calendar-head-row",this._nav_pm=j("&lsaquo;",1,-1,"",{"text-align":"center","font-size":"2em","line-height":"1em"},"js-btn btn-prev-month"),this._nav_month=j('<div style="text-align:center;font-size:1.2em"><span></span></div>',this.params.weekNumbers?6:5,888,"td",{textAlign:"center"}),this._nav_month.className="title",this._nav_nm=j(" &rsaquo;",1,1,"",{"text-align":"center","font-size":"2em","line-height":"1em"},"js-btn btn-next-month"),h=e("tr",f),h.className=a.params.weekNumbers?"daynames wk":"daynames",this.params.weekNumbers&&(g=e("td",h),g.className="day-name wn",g.innerHTML=JoomlaCalLocale.wk);for(var k=7;k>0;--k)g=e("td",h),k||(g.calendar=a);this.firstdayname=this.params.weekNumbers?h.firstChild.nextSibling:h.firstChild;for(var l=this.params.firstDayOfWeek,g=this.firstdayname,m=JoomlaCalLocale.weekend,k=0;k<7;++k){var n=(k+l)%7;g.classList.add("day-name"),this.params.weekNumbers?g.classList.add("day-name-week"):"",k&&(g.calendar=a,g.fdow=n),m.indexOf(m)!=-1&&g.classList.add("weekend"),g.innerHTML=JoomlaCalLocale.shortDays[(k+l)%7],g=g.nextSibling}var o=e("tbody",c);for(this.tbody=o,k=6;k>0;--k){h=e("tr",o),this.params.weekNumbers&&(g=e("td",h));for(var p=7;p>0;--p)g=e("td",h),g.calendar=this,g.addEventListener("mousedown",this._dayMouseDown,!0)}if(this.params.showsTime){h=e("tr",o),h.className="time",g=e("td",h),g.className="time time-title",g.colSpan=1,g.style.verticalAlign="middle",g.innerHTML=JoomlaCalLocale.time||"&#160;";var q=e("td",h);q.className="time hours-select",q.colSpan=2;var r=e("td",h);r.className="time minutes-select",r.colSpan=2,function(){function b(b,c,d,f,g){var i,h=e("select",g);h.calendar=a,h.className=b,h.setAttribute("data-chosen",!0),h.style.width="100%",h.navtype=50,h._range=[];for(var j=d;j<=f;++j){var k,l="";j==c&&(l=!0),j<10&&f>=10?(i="0"+j,k=Date.convertNumbers("0")+Date.convertNumbers(j)):(i=""+j,k=""+Date.convertNumbers(j)),h.options.add(new Option(k,i,l,l))}return h}var c=a.date.getHours(),d=a.date.getMinutes(),f=!a.params.time24,i=a.date.getHours()>12;f&&i&&(c-=12);var j=b("time time-hours",c,f?1:0,f?12:23,q),k=b("time time-minutes",d,0,59,r),l=null;if(g=e("td",h),g.className="time ampm-select",g.colSpan=a.params.weekNumbers?1:2,f){var m=!0,n=Date.parseFieldDate(a.inputField.getAttribute("data-alt-value"),a.params.dateFormat,"gregorian");i=n.getHours()>12;var o=e("select",g);o.className="time-ampm",o.style.width="100%",o.options.add(new Option(JoomlaCalLocale.PM,"pm",i?m:"",i?m:"")),o.options.add(new Option(JoomlaCalLocale.AM,"am",i?"":m,i?"":m)),l=o,l.addEventListener("change",function(b){a.updateTime(b.target.parentNode.parentNode.childNodes[1].childNodes[0].value,b.target.parentNode.parentNode.childNodes[2].childNodes[0].value,b.target.parentNode.parentNode.childNodes[3].childNodes[0].value)},!1)}else g.innerHTML="&#160;",g.colSpan=a.params.weekNumbers?3:2;j.addEventListener("change",function(b){a.updateTime(b.target.parentNode.parentNode.childNodes[1].childNodes[0].value,b.target.parentNode.parentNode.childNodes[2].childNodes[0].value,b.target.parentNode.parentNode.childNodes[3].childNodes[0].value)},!1),k.addEventListener("change",function(b){a.updateTime(b.target.parentNode.parentNode.childNodes[1].childNodes[0].value,b.target.parentNode.parentNode.childNodes[2].childNodes[0].value,b.target.parentNode.parentNode.childNodes[3].childNodes[0].value)},!1)}()}h=e("tr",o),h.className="btn-row";var s=this.inputField.hasAttribute("required")?"none;":"block;";if(this._nav_save=j('<a class="js-btn btn btn-clear" data-action="clear" style="display:'+s+'padding:2px 6px;">'+JoomlaCalLocale.save+"</a>",2,100,"td",{textAlign:"center"}),!this.inputField.hasAttribute("required")){var t=h.querySelector('a[data-action="clear"]');t.addEventListener("click",function(b){var c=t.parentNode.parentNode;"TD"===c.tagName&&a.cellClick(a._nav_save,b)},!0)}if(this.params.showsTodayBtn){this._nav_now=j('<a class="js-btn btn btn-primary btn-today" data-action="today" style="display:block;padding:2px 6px;">'+JoomlaCalLocale.today+"</a>",this.params.weekNumbers?4:3,0,"td",{textAlign:"center"});var u=h.querySelector('a[data-action="today"]');u.addEventListener("click",function(b){var c=u.parentNode.parentNode;"TD"===c.tagName&&a.cellClick(a._nav_now,b)},!0)}else g=e("td",h),g.innerHTML="&#160;",g.colSpan=this.params.weekNumbers?4:3;this._nav_exit=j('<a class="js-btn btn btn-danger btn-exit" data-action="exit" style="display:block;padding:2px 6px;">'+JoomlaCalLocale.exit+"</a>",2,200,"td",{textAlign:"center"});var v=h.querySelector('a[data-action="exit"]');v.addEventListener("click",function(b){var c=v.parentNode.parentNode;"TD"===c.tagName&&a.cellClick(a._nav_exit,b)},!0),this.processCalendar()},c.prototype.processCalendar=function(){this.table.style.visibility="hidden";var a=this.params.firstDayOfWeek,b=this.date,c=new Date,d=c.getLocalFullYear(this.params.dateType),e=c.getLocalMonth(this.params.dateType),f=c.getLocalDate(this.params.dateType),g=b.getOtherFullYear(this.params.dateType),h=b.getHours(),i=b.getMinutes(),k=(b.getSeconds(),!this.params.time24);g<this.params.minYear?(g=this.params.minYear,b.getOtherFullYear(this.params.dateType,g)):g>this.params.maxYear&&(g=this.params.maxYear,b.getOtherFullYear(this.params.dateType,g)),this.params.firstDayOfWeek=a,this.date=new Date(b);var l=b.getLocalMonth(this.params.dateType),m=b.getLocalDate(this.params.dateType);b.setLocalDate(this.params.dateType,1);var n=(b.getLocalDay(this.params.dateType)-this.params.firstDayOfWeek)%7;n<0&&(n+=7),b.setLocalDate(this.params.dateType,-n),b.setLocalDate(this.params.dateType,b.getLocalDate(this.params.dateType)+1);for(var o=this.tbody.firstChild,p=this.ar_days=new Array,q=JoomlaCalLocale.weekend,r=parseInt(b.getLocalWeekDays(this.params.dateType)),s=0;s<r;++s,o=o.nextSibling){var t=o.firstChild;this.params.weekNumbers&&(t.className="day wn",t.innerHTML=b.getLocalWeekNumber(this.params.dateType),t=t.nextSibling),o.className=this.params.weekNumbers?"daysrow wk":"daysrow";for(var v,u=!1,w=p[s]=[],x=r+1,y=0;y<x;++y,t=t.nextSibling,b.setLocalDate(this.params.dateType,v+1)){t.className="day",t.style.textAlign="center",v=b.getLocalDate(this.params.dateType);var z=b.getLocalDay(this.params.dateType);t.pos=s<<4|y,w[y]=t;var A=b.getLocalMonth(this.params.dateType)==l;if(A)t.otherMonth=!1,u=!0,t.style.cursor="pointer";else{if(!this.params.showsOthers){t.className+=" emptycell",t.innerHTML="&#160;",t.disabled=!0;continue}t.className+=" disabled othermonth ",t.otherMonth=!0}t.disabled=!1,t.innerHTML=this.params.debug?v:Date.convertNumbers(v),t.disabled||(t.caldate=new Date(b),A&&v==m&&(t.className+=" selected",this.currentDateEl=t),b.getLocalFullYear(this.params.dateType)==d&&b.getLocalMonth(this.params.dateType)==e&&v==f&&(t.className+=" today"),q.indexOf(z)!=-1&&(t.className+=" weekend"))}u||this.params.showsOthers?o.style.display="":(o.style.display="none",o.className="emptyrow")}if(this.params.showsTime){h>12&&k&&(h-=12),h=h<10?"0"+h:h,i=i<10?"0"+i:i;var B=this.table.querySelector(".time-hours"),C=this.table.querySelector(".time-minutes");if(this.resetSelected(B),B.value=h,this.resetSelected(C),C.value=i,!this.params.time24){var D=new Date(this.inputField.getAttribute("data-alt-value")),E=this.table.querySelector(".time-ampm"),F=D.getHours();F>12&&(this.resetSelected(E),E.value="pm")}}if(this.params.compressedHeader){var G=Date.convertNumbers(g.toString());this._nav_month.getElementsByTagName("span")[0].innerHTML=this.params.monthBefore?G+" - "+JoomlaCalLocale.months[l]:JoomlaCalLocale.months[l]+" - "+G}else this._nav_month.getElementsByTagName("span")[0].innerHTML=this.params.debug?l+" "+JoomlaCalLocale.months[l]:JoomlaCalLocale.months[l],this.title.getElementsByTagName("span")[0].innerHTML=this.params.debug?g+" "+Date.convertNumbers(g.toString()):Date.convertNumbers(g.toString());this.table.style.visibility="visible"},c.prototype._bindEvents=function(){var a=this;this.inputField.addEventListener("focus",function(){a.show()},!0),this.inputField.addEventListener("blur",function(b){if(null==b.relatedTarget||!(b.relatedTarget.classList.contains("time-hours")||b.relatedTarget.classList.contains("time-minutes")||b.relatedTarget.classList.contains("time-ampm"))){for(var c=b.target;c.parentNode;)if(c=c.parentNode,c.classList.contains("field-calendar"))return;a.close()}},!0),this.button.addEventListener("click",function(){a.show()},!1)};var d=function(b){return b||(b=a.event),b.preventDefault(),b.stopPropagation(),!1},e=function(a,c){var d=null;return d=b.createElement(a),"undefined"!=typeof c&&c.appendChild(d),d},f=function(a){return!isNaN(a)&&function(a){return(0|a)===a}(parseFloat(a))},g=function(a,b){var c=new Date,d=c.getLocalFullYear(b);return d+a};Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length>>>0,c=Number(arguments[1])||0;for(c=c<0?Math.ceil(c):Math.floor(c),c<0&&(c+=b);c<b;c++)if(c in this&&this[c]===a)return c;return-1}),c.getCalObject=function(a){if(!a)return!1;for(;a.parentNode;)if(a=a.parentNode,a.classList.contains("field-calendar"))return a;return!1},c.prototype.setAltValue=function(){var a=this.inputField;a.getAttribute("data-alt-value")&&a.getAttribute("data-alt-value")?a.value=a.getAttribute("data-alt-value"):a.value=""},c.init=function(d){var e,f,g;for(e=b.querySelectorAll(d),a.JoomlaCalLocale=a.JoomlaCalLocale?JoomlaCalLocale:{},JoomlaCalLocale.today=JoomlaCalLocale.today?JoomlaCalLocale.today:"today",JoomlaCalLocale.weekend=JoomlaCalLocale.weekend?JoomlaCalLocale.weekend:[0,6],JoomlaCalLocale.localLangNumbers=JoomlaCalLocale.localLangNumbers?JoomlaCalLocale.localLangNumbers:[0,1,2,3,4,5,6,7,8,9],JoomlaCalLocale.wk=JoomlaCalLocale.wk?JoomlaCalLocale.wk:"wk",JoomlaCalLocale.AM=JoomlaCalLocale.AM?JoomlaCalLocale.AM:"AM",JoomlaCalLocale.PM=JoomlaCalLocale.PM?JoomlaCalLocale.PM:"PM",JoomlaCalLocale.am=JoomlaCalLocale.am?JoomlaCalLocale.am:"am",JoomlaCalLocale.pm=JoomlaCalLocale.pm?JoomlaCalLocale.pm:"pm",JoomlaCalLocale.dateType=JoomlaCalLocale.dateType?JoomlaCalLocale.dateType:"gregorian",JoomlaCalLocale.time=JoomlaCalLocale.time?JoomlaCalLocale.time:"time",JoomlaCalLocale.days=JoomlaCalLocale.days?JoomlaCalLocale.days:'["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]',JoomlaCalLocale.shortDays=JoomlaCalLocale.shortDays?JoomlaCalLocale.shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],JoomlaCalLocale.months=JoomlaCalLocale.months?JoomlaCalLocale.months:["January","February","March","April","May","June","July","August","September","October","November","December"],JoomlaCalLocale.shortMonths=JoomlaCalLocale.shortMonths?JoomlaCalLocale.shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],JoomlaCalLocale.minYear=JoomlaCalLocale.minYear?JoomlaCalLocale.minYear:1900,JoomlaCalLocale.maxYear=JoomlaCalLocale.maxYear?JoomlaCalLocale.maxYear:2100,JoomlaCalLocale.exit=JoomlaCalLocale.exit?JoomlaCalLocale.exit:"Cancel",JoomlaCalLocale.clear=JoomlaCalLocale.clear?JoomlaCalLocale.clear:"Clear",f=0;f<e.length;f++){var h=e[f];g=h._joomlaCalendar,g||(g=new c(h),g.inputField.form.addEventListener("submit",function(){g.setAltValue()}))}},a.JoomlaCalendar=c,b.addEventListener("DOMContentLoaded",function(){c.init(".field-calendar")})}(window,document);

The same content is in 2 releases, Joomla 3.7.0-beta2 to 3.7.0-beta3. See them all, or every version of this file.