{"version":3,"sources":["kendo.calendar.js"],"names":["f","define","$","undefined","title","date","min","max","modular","end","start","getFullYear","minYear","maxYear","view","options","data","idx","setter","build","weekNumberBuild","length","cells","isWeekColumnVisible","cellsPerRow","perRow","otherMonth","lastDayOfMonth","weekNumber","weekNumberTemplate","content","cellTemplate","empty","emptyCellTemplate","otherMonthTemplate","otherMonthCellTemplate","html","createDate","getMonth","getDate","adjustDST","disableDates","cssClass","indexOf","OTHERMONTH","isInRange","compare","date1","date2","modifier","year1","result","getToday","today","DATE","restrictValue","value","shiftArray","array","slice","concat","setDate","multiplier","setFullYear","daysBetweenTwoDates","startDate","endDate","temp","fromDateUTC","endDateUTC","calendar","views","Date","UTC","Math","ceil","kendo","MS_PER_DAY","addDaysToArray","numberOfDays","fromDate","i","nextDay","getTime","push","mousetoggle","e","disabled","this","hasClass","toggleClass","HOVER","MOUSEENTER","type","FOCUS","prevent","preventDefault","year","month","dateObject","getCalendarInfo","culture","getCulture","calendars","standard","normalize","depth","format","extractFormat","patterns","d","isNaN","MONTH","dates","makeUnselectable","element","isIE8","find","attr","addClassToViewContainer","currentView","addClass","inArray","isEqualDatePart","value1","value2","isEqualMonth","getDisabledExpr","option","isFunction","isArray","createDisabledExpr","noop","convertDatesArray","setHours","body","callback","day","index","disabledDates","days","searchExpression","toLowerCase","Function","isEqualDate","oldValue","newValue","toDateObject","link","VALUE","split","window","support","ui","Widget","keys","parse","parseDate","weekInYear","Selectable","_extractFormat","template","transitions","transitionOrigin","css","useWithBlock","browser","msie","version","outerWidth","_outerWidth","ns","CLICK","KEYDOWN_NS","ID","MIN","LEFT","SLIDE","CENTURY","CHANGE","NAVIGATE","DISABLED","FOCUSED","OTHERMONTHCLASS","OUTOFRANGE","TODAY","CELLSELECTOR","CELLSELECTORVALID","WEEKCOLUMNSELECTOR","SELECTED","BLUR","FOCUS_WITH_NS","touch","MOUSEENTER_WITH_NS","MOUSELEAVE","MS_PER_MINUTE","PREVARROW","NEXTARROW","ARIA_DISABLED","ARIA_SELECTED","ARIA_LABEL","proxy","extend","decade","century","HEADERSELECTOR","CLASSIC_HEADER_TEMPLATE","MODERN_HEADER_TEMPLATE","Calendar","init","id","that","componentType","fn","call","wrapper","url","unescape","_templates","_selectable","_header","_viewWrapper","hasFooter","_footer","footer","on","_move","currentTarget","firstChild","href","_view","name","selectable","_click","_focusView","focusOnNav","_cellID","_isMultipleSelection","first","closest","last","_lastActive","selectRange","event","_current","_value","_class","_selectDates","_index","_addClassProxy","_active","_cell","todayString","toDateString","_cellByDate","_removeClassProxy","removeClass","selectDates","notify","animation","horizontal","effects","reverse","duration","divisor","vertical","messages","weekColumnHeader","events","componentTypes","classic","header","linksSelector","contentClasses","modern","setOptions","_destroySelectable","hide","navigate","destroy","_today","off","_title","_table","current","focus","table","_bindTable","trigger","_option","navigateToPast","_navigate","navigateToFuture","navigateUp","navigateDown","from","old","currentValue","future","to","viewWrapper","replace","_oldTable","children","kendoStop","_changeView","_animate","_focus","_visualizeSelectedDatesInView","validSelectedDates","datesUnique","map","filter","position","time","grep","_validateValue","selectedDates","each","clear","_selectElement","selectableOptions","parseOptions","multiple","aria","inputSelectors","change","_onSelect","relatedTarget","_onRelatedTarget","target","is","eventArgs","ctrlKey","metaKey","_toggleSelection","_cellsBySelector","_deselect","_addSelectedCellsToArray","shiftKey","_rangeSelection","currentCell","toDateCell","daysDifference","toDate","selector","item","currentDateIndex","Number","splice","_dateInView","firstDateInView","lastDateInView","_isNavigatable","cellIndex","cell","isDisabled","method","focusedDate","key","keyCode","isRtl","RIGHT","UP","DOWN","SPACEBAR","HOME","END","getHours","getMinutes","getSeconds","getMilliseconds","ENTER","_keyboardToggleSelection","_nextNavigatable","_keyboardRangeSelection","PAGEUP","PAGEDOWN","_unselect","navigatableDate","active","parent","remove","append","insertAfter","_horizontal","viewWidth","add","width","wrap","float","margin-left","complete","unwrap","kendoAnimate","_vertical","insertBefore","left","parseInt","top","height","className","disabledDate","removeAttribute","appendTo","show","toString","_toggle","actionAttr","_todayClick","arrow","firstDayCurrentMonth","has","isBigger","toggle","isTodayDisabled","footerTemplate","plugin","firstDayOfMonth","firstVisibleDay","calendarInfo","firstDay","getDay","setTime","tzOffsetBefore","getTimezoneOffset","resultDATE","tzOffsetDiff","months","names","navigateUrl","showHeader","hasUrl","currentCalendar","firstDayIdx","shortNames","namesShort","linkClass","dateString","join","currentDate","timeOffset","abs","month1","month2","year2","hours","namesAbbr","setMonth","viewsEnum","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,kBACH,aACA,oBACDD,IACL,WAo4CE,MAz3CC,UAAUE,EAAGC,GAgqCV,QAASC,GAAMC,EAAMC,EAAKC,EAAKC,GAC3B,GAA0FC,GAAtFC,EAAQL,EAAKM,cAAeC,EAAUN,EAAIK,cAAeE,EAAUN,EAAII,aAS3E,OARAD,IAAgBA,EAAQF,EACxBC,EAAMC,GAASF,EAAU,GACrBE,EAAQE,IACRF,EAAQE,GAERH,EAAMI,IACNJ,EAAMI,GAEHH,EAAQ,IAAMD,EAEzB,QAASK,GAAKC,GACV,GAAaC,GAATC,EAAM,EAASX,EAAMS,EAAQT,IAAKC,EAAMQ,EAAQR,IAAKG,EAAQK,EAAQL,MAAOQ,EAASH,EAAQG,OAAQC,EAAQJ,EAAQI,MAAOC,EAAkBL,EAAQK,gBAAiBC,EAASN,EAAQO,OAAS,GAAIC,EAAsBR,EAAQQ,oBAAqBC,EAAcT,EAAQU,QAAU,EAAGC,EAAaX,EAAQW,WAAYC,EAAiBZ,EAAQY,eAAgBC,EAAab,EAAQa,YAAcC,EAAoBC,EAAUf,EAAQe,SAAWC,EAAcC,EAAQjB,EAAQiB,OAASC,EAAmBC,EAAqBnB,EAAQoB,wBAA0BA,EAAwBC,EAAOrB,EAAQqB,MAAQ,sGAI7lB,KAHIb,IACAa,GAAQR,EAAWR,EAAgBV,KAEhCO,EAAMI,EAAQJ,IACbA,EAAM,GAAKA,EAAM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EAAKkC,YAEpEO,QAAS,SAAUC,EAAOC,GACtB,MAAOF,GAAQC,EAAOC,EAAO,MAEjCa,QAAS,SAAUxD,EAAMmD,GACrBK,EAAQxD,EAAMmD,EAAO,KAEzBqM,aAAc,SAAUxP,GACpB,GAAI4F,GAAO5F,EAAKM,aAChB,OAAOsF,GAAOA,EAAO,GAAK,WAgN1C3B,EAASqD,gBAAkBA,EAC3BrD,EAAS0E,YAAcA,EACvB1E,EAAS4C,iBAAmBA,EAC5B5C,EAASf,cAAgBA,EACzBe,EAASzB,UAAYA,EACrByB,EAASiD,wBAA0BA,EACnCjD,EAASmC,UAAYA,EACrBnC,EAAS2X,UAAY1X,GACrBD,EAASiB,SAAWwC,EACpBzD,EAAS6E,aAAeA,EACxB7E,EAASlB,SAAWA,EACpBkB,EAASjC,WAAaA,EACtBuC,EAAMN,SAAWA,GACnBiF,OAAO3E,MAAMsX,QACR3S,OAAO3E,OACE,kBAAV3E,SAAwBA,OAAOkc,IAAMlc,OAAS,SAAUmc,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.calendar.min.js","sourcesContent":["/*!\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n*/\n(function (f, define) {\n define('kendo.calendar', [\n 'kendo.core',\n 'kendo.selectable'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'calendar',\n name: 'Calendar',\n category: 'web',\n description: 'The Calendar widget renders a graphical calendar that supports navigation and selection.',\n depends: [\n 'core',\n 'selectable'\n ]\n };\n (function ($, undefined) {\n var kendo = window.kendo, support = kendo.support, ui = kendo.ui, Widget = ui.Widget, keys = kendo.keys, parse = kendo.parseDate, adjustDST = kendo.date.adjustDST, weekInYear = kendo.date.weekInYear, Selectable = kendo.ui.Selectable, extractFormat = kendo._extractFormat, template = kendo.template, getCulture = kendo.getCulture, transitions = kendo.support.transitions, transitionOrigin = transitions ? transitions.css + 'transform-origin' : '', cellTemplate = template('#=data.value#', { useWithBlock: false }), emptyCellTemplate = template('', { useWithBlock: false }), otherMonthCellTemplate = template(' ', { useWithBlock: false }), weekNumberTemplate = template('#= data.weekNumber #', { useWithBlock: false }), browser = kendo.support.browser, isIE8 = browser.msie && browser.version < 9, outerWidth = kendo._outerWidth, ns = '.kendoCalendar', CLICK = 'click' + ns, KEYDOWN_NS = 'keydown' + ns, ID = 'id', MIN = 'min', LEFT = 'left', SLIDE = 'slideIn', MONTH = 'month', CENTURY = 'century', CHANGE = 'change', NAVIGATE = 'navigate', VALUE = 'value', HOVER = 'k-state-hover', DISABLED = 'k-state-disabled', FOCUSED = 'k-state-focused', OTHERMONTH = 'k-other-month', OTHERMONTHCLASS = ' class=\"' + OTHERMONTH + '\"', OUTOFRANGE = 'k-out-of-range', TODAY = 'k-nav-today', CELLSELECTOR = 'td:has(.k-link)', CELLSELECTORVALID = 'td:has(.k-link):not(.' + DISABLED + '):not(.' + OUTOFRANGE + ')', WEEKCOLUMNSELECTOR = 'td:not(:has(.k-link))', SELECTED = 'k-state-selected', BLUR = 'blur' + ns, FOCUS = 'focus', FOCUS_WITH_NS = FOCUS + ns, MOUSEENTER = support.touch ? 'touchstart' : 'mouseenter', MOUSEENTER_WITH_NS = support.touch ? 'touchstart' + ns : 'mouseenter' + ns, MOUSELEAVE = support.touch ? 'touchend' + ns + ' touchmove' + ns : 'mouseleave' + ns, MS_PER_MINUTE = 60000, MS_PER_DAY = 86400000, PREVARROW = '_prevArrow', NEXTARROW = '_nextArrow', ARIA_DISABLED = 'aria-disabled', ARIA_SELECTED = 'aria-selected', ARIA_LABEL = 'aria-label', proxy = $.proxy, extend = $.extend, DATE = Date, views = {\n month: 0,\n year: 1,\n decade: 2,\n century: 3\n }, HEADERSELECTOR = '.k-header, .k-calendar-header', CLASSIC_HEADER_TEMPLATE = '
' + '' + '' + '' + '
', MODERN_HEADER_TEMPLATE = '
' + '' + '' + '' + '' + '' + '#=messages.today#' + '' + '' + '' + '' + '
';\n var Calendar = Widget.extend({\n init: function (element, options) {\n var that = this, value, id;\n options = options || {};\n options.componentType = options.componentType || 'classic';\n Widget.fn.init.call(that, element, options);\n element = that.wrapper = that.element;\n options = that.options;\n options.url = kendo.unescape(options.url);\n that.options.disableDates = getDisabledExpr(that.options.disableDates);\n that._templates();\n that._selectable();\n that._header();\n that._viewWrapper();\n if (that.options.hasFooter) {\n that._footer(that.footer);\n }\n id = element.addClass('k-widget k-calendar ' + (options.weekNumber ? ' k-week-number' : '')).on(MOUSEENTER_WITH_NS + ' ' + MOUSELEAVE, CELLSELECTOR, mousetoggle).on(KEYDOWN_NS, 'table.k-content', proxy(that._move, that)).on(CLICK + ' touchend', CELLSELECTOR, function (e) {\n var link = e.currentTarget.firstChild, value = toDateObject(link);\n if (link.href.indexOf('#') != -1) {\n e.preventDefault();\n }\n if (that._view.name == 'month' && that.options.disableDates(value)) {\n return;\n }\n if (that._view.name != 'month' || options.selectable == 'single') {\n that._click($(link));\n }\n }).on('mouseup' + ns, 'table.k-content, .k-footer', function () {\n that._focusView(that.options.focusOnNav !== false);\n }).attr(ID);\n if (id) {\n that._cellID = id + '_cell_selected';\n }\n if (that._isMultipleSelection() && that.options.weekNumber) {\n element.on(CLICK, WEEKCOLUMNSELECTOR, function (e) {\n var first = $(e.currentTarget).closest('tr').find(CELLSELECTORVALID).first(), last = that.selectable._lastActive = $(e.currentTarget).closest('tr').find(CELLSELECTORVALID).last();\n that.selectable.selectRange(first, last, { event: e });\n that._current = that._value = toDateObject(last.find('a'));\n that._class(FOCUSED, that._current);\n });\n }\n normalize(options);\n value = parse(options.value, options.format, options.culture);\n that._selectDates = [];\n that._index = views[options.start];\n that._current = new DATE(+restrictValue(value, options.min, options.max));\n that._addClassProxy = function () {\n that._active = true;\n if (that._cell.hasClass(DISABLED)) {\n var todayString = that._view.toDateString(getToday());\n that._cell = that._cellByDate(todayString);\n }\n that._cell.addClass(FOCUSED);\n };\n that._removeClassProxy = function () {\n that._active = false;\n that._cell.removeClass(FOCUSED);\n };\n that.value(value);\n if (that._isMultipleSelection() && options.selectDates.length > 0) {\n that.selectDates(options.selectDates);\n }\n kendo.notify(that);\n },\n options: {\n name: 'Calendar',\n value: null,\n min: new DATE(1900, 0, 1),\n max: new DATE(2099, 11, 31),\n dates: [],\n disableDates: null,\n url: '',\n culture: '',\n footer: '',\n format: '',\n month: {},\n weekNumber: false,\n selectable: 'single',\n selectDates: [],\n start: MONTH,\n depth: MONTH,\n animation: {\n horizontal: {\n effects: SLIDE,\n reverse: true,\n duration: 500,\n divisor: 2\n },\n vertical: {\n effects: 'zoomIn',\n duration: 400\n }\n },\n messages: {\n weekColumnHeader: '',\n today: 'Today'\n },\n componentType: 'classic'\n },\n events: [\n CHANGE,\n NAVIGATE\n ],\n componentTypes: {\n 'classic': {\n header: { template: CLASSIC_HEADER_TEMPLATE },\n hasFooter: true,\n linksSelector: '.k-link',\n contentClasses: 'k-content'\n },\n 'modern': {\n header: { template: MODERN_HEADER_TEMPLATE },\n hasFooter: false,\n linksSelector: '.k-button',\n contentClasses: 'k-content k-calendar-content'\n }\n },\n setOptions: function (options) {\n var that = this;\n normalize(options);\n options.disableDates = getDisabledExpr(options.disableDates);\n that._destroySelectable();\n Widget.fn.setOptions.call(that, options);\n that._templates();\n that._selectable();\n that._viewWrapper();\n if (that.options.hasFooter) {\n that._footer(that.footer);\n } else {\n that.element.find('.k-footer').hide();\n }\n that._index = views[that.options.start];\n that.navigate();\n if (options.weekNumber) {\n that.element.addClass('k-week-number');\n }\n },\n destroy: function () {\n var that = this, today = that._today;\n that.element.off(ns);\n that._title.off(ns);\n that[PREVARROW].off(ns);\n that[NEXTARROW].off(ns);\n that._destroySelectable();\n kendo.destroy(that._table);\n if (today) {\n kendo.destroy(today.off(ns));\n }\n Widget.fn.destroy.call(that);\n },\n current: function () {\n return this._current;\n },\n view: function () {\n return this._view;\n },\n focus: function (table) {\n table = table || this._table;\n this._bindTable(table);\n table.trigger('focus');\n },\n min: function (value) {\n return this._option(MIN, value);\n },\n max: function (value) {\n return this._option('max', value);\n },\n navigateToPast: function () {\n this._navigate(PREVARROW, -1);\n },\n navigateToFuture: function () {\n this._navigate(NEXTARROW, 1);\n },\n navigateUp: function () {\n var that = this, index = that._index;\n if (that._title.hasClass(DISABLED)) {\n return;\n }\n that.navigate(that._current, ++index);\n },\n navigateDown: function (value) {\n var that = this, index = that._index, depth = that.options.depth;\n if (!value) {\n return;\n }\n if (index === views[depth]) {\n if (!isEqualDate(that._value, that._current) || !isEqualDate(that._value, value)) {\n that.value(value);\n that.trigger(CHANGE);\n }\n return;\n }\n that.navigate(value, --index);\n },\n navigate: function (value, view) {\n view = isNaN(view) ? views[view] : view;\n var that = this, options = that.options, culture = options.culture, min = options.min, max = options.max, title = that._title, from = that._table, old = that._oldTable, currentValue = that._current, future = value && +value > +currentValue, vertical = view !== undefined && view !== that._index, to, currentView, compare, disabled, viewWrapper = that.element.children('.k-calendar-view');\n if (!value) {\n value = currentValue;\n }\n that._current = value = new DATE(+restrictValue(value, min, max));\n if (view === undefined) {\n view = that._index;\n } else {\n that._index = view;\n }\n that._view = currentView = calendar.views[view];\n compare = currentView.compare;\n disabled = view === views[CENTURY];\n title.toggleClass(DISABLED, disabled).attr(ARIA_DISABLED, disabled);\n disabled = compare(value, min) < 1;\n that[PREVARROW].toggleClass(DISABLED, disabled).attr(ARIA_DISABLED, disabled);\n if (that[PREVARROW].hasClass(DISABLED)) {\n that[PREVARROW].removeClass(HOVER);\n }\n disabled = compare(value, max) > -1;\n that[NEXTARROW].toggleClass(DISABLED, disabled).attr(ARIA_DISABLED, disabled);\n if (that[NEXTARROW].hasClass(DISABLED)) {\n that[NEXTARROW].removeClass(HOVER);\n }\n if (from && old && old.data('animating')) {\n old.kendoStop(true, true);\n from.kendoStop(true, true);\n }\n that._oldTable = from;\n if (!from || that._changeView) {\n title.html(currentView.title(value, min, max, culture));\n that._table = to = $(currentView.content(extend({\n min: min,\n max: max,\n date: value,\n url: options.url,\n dates: options.dates,\n format: options.format,\n otherMonth: true,\n culture: culture,\n disableDates: options.disableDates,\n isWeekColumnVisible: options.weekNumber,\n messages: options.messages,\n contentClasses: that.options.contentClasses\n }, that[currentView.name])));\n addClassToViewContainer(to, currentView.name);\n makeUnselectable(to);\n var replace = from && from.data('start') === to.data('start');\n that._animate({\n from: from,\n to: to,\n vertical: vertical,\n future: future,\n replace: replace\n });\n if (that.options.componentType === 'modern') {\n viewWrapper.removeClass('k-calendar-monthview k-calendar-yearview k-calendar-decadeview k-calendar-centuryview');\n viewWrapper.addClass('k-calendar-' + currentView.name + 'view');\n }\n that.trigger(NAVIGATE);\n that._focus(value);\n }\n if (view === views[options.depth] && that._selectDates.length > 0) {\n that._visualizeSelectedDatesInView();\n }\n if (that.options.selectable === 'single') {\n if (view === views[options.depth] && that._value && !that.options.disableDates(that._value)) {\n that._class('k-state-selected', that._value);\n }\n }\n that._class(FOCUSED, value);\n if (!from && that._cell) {\n that._cell.removeClass(FOCUSED);\n }\n that._changeView = true;\n },\n selectDates: function (dates) {\n var that = this, validSelectedDates, datesUnique;\n if (dates === undefined) {\n return that._selectDates;\n }\n datesUnique = dates.map(function (date) {\n return date.getTime();\n }).filter(function (date, position, array) {\n return array.indexOf(date) === position;\n }).map(function (time) {\n return new Date(time);\n });\n validSelectedDates = $.grep(datesUnique, function (value) {\n if (value) {\n return +that._validateValue(new Date(value.setHours(0, 0, 0, 0))) === +value;\n }\n });\n that._selectDates = validSelectedDates.length > 0 ? validSelectedDates : datesUnique.length === 0 ? datesUnique : that._selectDates;\n that._visualizeSelectedDatesInView();\n },\n value: function (value) {\n var that = this, old = that._view, view = that._view;\n if (value === undefined) {\n return that._value;\n }\n value = that._validateValue(value);\n if (value && that._isMultipleSelection()) {\n var date = new Date(+value);\n date.setHours(0, 0, 0, 0);\n that._selectDates = [date];\n that.selectable._lastActive = null;\n }\n if (old && value === null && that._cell) {\n that._cell.removeClass(SELECTED);\n } else {\n that._changeView = !value || view && view.compare(value, that._current) !== 0;\n that.navigate(value);\n }\n },\n _validateValue: function (value) {\n var that = this, options = that.options, min = options.min, max = options.max;\n if (value === null) {\n that._current = createDate(that._current.getFullYear(), that._current.getMonth(), that._current.getDate());\n }\n value = parse(value, options.format, options.culture);\n if (value !== null) {\n value = new DATE(+value);\n if (!isInRange(value, min, max)) {\n value = null;\n }\n }\n if (value === null || !that.options.disableDates(new Date(+value))) {\n that._value = value;\n } else if (that._value === undefined) {\n that._value = null;\n }\n return that._value;\n },\n _visualizeSelectedDatesInView: function () {\n var that = this;\n var selectedDates = {};\n $.each(that._selectDates, function (index, value) {\n selectedDates[kendo.calendar.views[0].toDateString(value)] = value;\n });\n that.selectable.clear();\n var cells = that._table.find(CELLSELECTOR).filter(function (index, element) {\n return selectedDates[$(element.firstChild).attr(kendo.attr(VALUE))];\n });\n if (cells.length > 0) {\n that.selectable._selectElement(cells, true);\n }\n },\n _isMultipleSelection: function () {\n var that = this;\n return that.options.selectable === 'multiple';\n },\n _selectable: function () {\n var that = this;\n if (!that._isMultipleSelection()) {\n return;\n }\n var selectable = that.options.selectable, selectableOptions = Selectable.parseOptions(selectable);\n if (selectableOptions.multiple) {\n that.element.attr('aria-multiselectable', 'true');\n }\n that.selectable = new Selectable(that.wrapper, {\n aria: true,\n inputSelectors: 'input,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-arrow-60-down,span.k-icon.k-i-arrow-60-up',\n multiple: selectableOptions.multiple,\n filter: 'table.k-month:eq(0) ' + CELLSELECTORVALID,\n change: proxy(that._onSelect, that),\n relatedTarget: proxy(that._onRelatedTarget, that)\n });\n },\n _onRelatedTarget: function (target) {\n var that = this;\n if (that.selectable.options.multiple && target.is(CELLSELECTORVALID)) {\n that._current = toDateObject(target.find('a'));\n that._class(FOCUSED, toDateObject(target.find('a')));\n }\n },\n _onSelect: function (e) {\n var that = this, eventArgs = e, selectableOptions = Selectable.parseOptions(that.options.selectable);\n if (!selectableOptions.multiple) {\n if ($(eventArgs.event.currentTarget).is('td') && !$(eventArgs.event.currentTarget).hasClass('k-state-selected')) {\n $(eventArgs.event.currentTarget).addClass('k-state-selected');\n } else {\n that._click($(eventArgs.event.currentTarget).find('a'));\n }\n return;\n }\n if (eventArgs.event.ctrlKey || eventArgs.event.metaKey) {\n if ($(eventArgs.event.currentTarget).is(CELLSELECTORVALID)) {\n that._toggleSelection($(eventArgs.event.currentTarget));\n } else {\n that._cellsBySelector(CELLSELECTORVALID).each(function (index, element) {\n var value = toDateObject($(element).find('a'));\n that._deselect(value);\n });\n that._addSelectedCellsToArray();\n }\n } else if (eventArgs.event.shiftKey) {\n that._rangeSelection(that._cell);\n } else if ($(eventArgs.event.currentTarget).is(CELLSELECTOR)) {\n that.value(toDateObject($(eventArgs.event.currentTarget).find('a')));\n } else {\n that._selectDates = [];\n that._addSelectedCellsToArray();\n }\n that.trigger(CHANGE);\n },\n _destroySelectable: function () {\n var that = this;\n if (that.selectable) {\n that.selectable.destroy();\n that.selectable = null;\n }\n },\n _toggleSelection: function (currentCell) {\n var that = this, date = toDateObject(currentCell.find('a'));\n if (currentCell.hasClass('k-state-selected')) {\n that._selectDates.push(date);\n } else {\n that._deselect(date);\n }\n },\n _rangeSelection: function (toDateCell, startDate) {\n var that = this, fromDate = startDate || toDateObject(that.selectable.value().first().find('a')), toDate = toDateObject(toDateCell.find('a')), daysDifference;\n if (that.selectable._lastActive || that._value) {\n fromDate = that.selectable._lastActive ? toDateObject(that.selectable._lastActive.find('a')) : new Date(+that._value);\n } else {\n that.selectable._lastActive = startDate ? that._cellByDate(that._view.toDateString(startDate), CELLSELECTORVALID) : that.selectable.value().first();\n }\n that._selectDates = [];\n daysDifference = daysBetweenTwoDates(fromDate, toDate);\n addDaysToArray(that._selectDates, daysDifference, fromDate, that.options.disableDates);\n that._visualizeSelectedDatesInView();\n },\n _cellsBySelector: function (selector) {\n var that = this;\n return that._table.find(selector);\n },\n _addSelectedCellsToArray: function () {\n var that = this;\n that.selectable.value().each(function (index, item) {\n var date = toDateObject($(item.firstChild));\n if (!that.options.disableDates(date)) {\n that._selectDates.push(date);\n }\n });\n },\n _deselect: function (date) {\n var that = this;\n var currentDateIndex = that._selectDates.map(Number).indexOf(+date);\n if (currentDateIndex != -1) {\n that._selectDates.splice(currentDateIndex, 1);\n }\n },\n _dateInView: function (date) {\n var that = this, firstDateInView = toDateObject(that._cellsBySelector(CELLSELECTORVALID + ':first').find('a')), lastDateInView = toDateObject(that._cellsBySelector(CELLSELECTORVALID + ':last').find('a'));\n return +date <= +lastDateInView && +date >= +firstDateInView;\n },\n _isNavigatable: function (currentValue, cellIndex) {\n var that = this;\n var isDisabled = that.options.disableDates;\n var cell;\n var index;\n if (that._view.name == 'month') {\n return !isDisabled(currentValue);\n } else {\n index = that.wrapper.find('.' + FOCUSED).index();\n cell = that.wrapper.find('.k-content td:eq(' + (index + cellIndex) + ')');\n return cell.is(CELLSELECTORVALID) || !isDisabled(currentValue);\n }\n },\n _move: function (e) {\n var that = this, options = that.options, key = e.keyCode, view = that._view, index = that._index, min = that.options.min, max = that.options.max, currentValue = new DATE(+that._current), isRtl = kendo.support.isRtl(that.wrapper), isDisabled = that.options.disableDates, value, prevent, method, temp;\n if (e.target === that._table[0]) {\n that._active = true;\n }\n if (key == keys.RIGHT && !isRtl || key == keys.LEFT && isRtl) {\n value = 1;\n prevent = true;\n } else if (key == keys.LEFT && !isRtl || key == keys.RIGHT && isRtl) {\n value = -1;\n prevent = true;\n } else if (key == keys.UP) {\n value = index === 0 ? -7 : -4;\n prevent = true;\n } else if (key == keys.DOWN) {\n value = index === 0 ? 7 : 4;\n prevent = true;\n } else if (key == keys.SPACEBAR) {\n value = 0;\n prevent = true;\n } else if (key == keys.HOME || key == keys.END) {\n method = key == keys.HOME ? 'first' : 'last';\n temp = view[method](currentValue);\n currentValue = new DATE(temp.getFullYear(), temp.getMonth(), temp.getDate(), currentValue.getHours(), currentValue.getMinutes(), currentValue.getSeconds(), currentValue.getMilliseconds());\n currentValue.setFullYear(temp.getFullYear());\n prevent = true;\n }\n if (e.ctrlKey || e.metaKey) {\n if (key == keys.RIGHT && !isRtl || key == keys.LEFT && isRtl) {\n that.navigateToFuture();\n prevent = true;\n } else if (key == keys.LEFT && !isRtl || key == keys.RIGHT && isRtl) {\n that.navigateToPast();\n prevent = true;\n } else if (key == keys.UP) {\n that.navigateUp();\n prevent = true;\n } else if (key == keys.DOWN) {\n that._click($(that._cell[0].firstChild));\n prevent = true;\n } else if ((key == keys.ENTER || key == keys.SPACEBAR) && that._isMultipleSelection()) {\n that._keyboardToggleSelection(e);\n var focusedDate = toDateObject($(that._cell[0]).find('a'));\n that._class(FOCUSED, focusedDate);\n }\n } else if (e.shiftKey) {\n if (value !== undefined || method) {\n if (!method) {\n view.setDate(currentValue, value);\n }\n if (!isInRange(currentValue, min, max)) {\n currentValue = restrictValue(currentValue, options.min, options.max);\n }\n if (isDisabled(currentValue)) {\n currentValue = that._nextNavigatable(currentValue, value);\n }\n min = createDate(min.getFullYear(), min.getMonth(), min.getDate());\n if (that._isMultipleSelection()) {\n that._keyboardRangeSelection(e, currentValue);\n } else {\n that._focus(currentValue);\n }\n }\n } else {\n if (key == keys.ENTER || key == keys.SPACEBAR) {\n if (view.name == 'month' && that._isMultipleSelection()) {\n that.value(toDateObject($(that._cell.find('a'))));\n that.selectable._lastActive = $(that._cell[0]);\n that.trigger(CHANGE);\n } else {\n that._click($(that._cell[0].firstChild));\n }\n prevent = true;\n } else if (key == keys.PAGEUP) {\n prevent = true;\n that.navigateToPast();\n } else if (key == keys.PAGEDOWN) {\n prevent = true;\n that.navigateToFuture();\n }\n if (value || method) {\n if (!method) {\n view.setDate(currentValue, value);\n }\n min = createDate(min.getFullYear(), min.getMonth(), min.getDate());\n if (!isInRange(currentValue, min, max)) {\n currentValue = restrictValue(currentValue, options.min, options.max);\n }\n if (!that._isNavigatable(currentValue, value)) {\n currentValue = that._nextNavigatable(currentValue, value);\n }\n if (that._isMultipleSelection()) {\n if (!that._dateInView(currentValue)) {\n that.navigate(currentValue);\n } else {\n that._current = currentValue;\n that._class(FOCUSED, currentValue);\n }\n } else {\n that._focus(currentValue);\n }\n }\n }\n if (prevent) {\n e.preventDefault();\n }\n return that._current;\n },\n _keyboardRangeSelection: function (event, currentValue) {\n var that = this, fromDate, daysDifference;\n if (!that._dateInView(currentValue)) {\n that._selectDates = [];\n fromDate = that.selectable._lastActive ? toDateObject(that.selectable._lastActive.find('a')) : currentValue;\n daysDifference = daysBetweenTwoDates(fromDate, new Date(+currentValue));\n addDaysToArray(that._selectDates, daysDifference, fromDate, that.options.disableDates);\n that.navigate(currentValue);\n that._current = currentValue;\n that.selectable._lastActive = that.selectable._lastActive || that._cellByDate(that._view.toDateString(currentValue), CELLSELECTORVALID);\n that.trigger(CHANGE);\n return;\n }\n that.selectable.options.filter = that.wrapper.find('table').length > 1 && +currentValue > +that._current ? 'table.k-month:eq(1) ' + CELLSELECTORVALID : 'table.k-month:eq(0) ' + CELLSELECTORVALID;\n that._class(FOCUSED, currentValue);\n that._current = currentValue;\n that._rangeSelection(that._cellByDate(that._view.toDateString(currentValue), CELLSELECTORVALID), currentValue);\n that.trigger(CHANGE);\n that.selectable.options.filter = 'table.k-month:eq(0) ' + CELLSELECTORVALID;\n },\n _keyboardToggleSelection: function (event) {\n var that = this;\n event.currentTarget = that._cell[0];\n that.selectable._lastActive = $(that._cell[0]);\n if ($(that._cell[0]).hasClass(SELECTED)) {\n that.selectable._unselect($(that._cell[0]));\n that.selectable.trigger(CHANGE, { event: event });\n } else {\n that.selectable.value($(that._cell[0]), { event: event });\n }\n },\n _nextNavigatable: function (currentValue, value) {\n var that = this, disabled = true, view = that._view, min = that.options.min, max = that.options.max, isDisabled = that.options.disableDates, navigatableDate = new Date(currentValue.getTime());\n view.setDate(navigatableDate, -value);\n while (disabled) {\n view.setDate(currentValue, value);\n if (!isInRange(currentValue, min, max)) {\n currentValue = navigatableDate;\n break;\n }\n disabled = isDisabled(currentValue);\n }\n return currentValue;\n },\n _animate: function (options) {\n var that = this;\n var from = options.from;\n var to = options.to;\n var active = that._active;\n var viewWrapper = that.element.children('.k-calendar-view');\n if (!from) {\n viewWrapper.append(to);\n that._bindTable(to);\n } else if (from.parent().data('animating')) {\n from.off(ns);\n from.parent().kendoStop(true, true).remove();\n from.remove();\n viewWrapper.append(to);\n that._focusView(active);\n } else if (!from.is(':visible') || that.options.animation === false || options.replace) {\n to.insertAfter(from);\n from.off(ns).remove();\n that._focusView(active);\n } else {\n that[options.vertical ? '_vertical' : '_horizontal'](from, to, options.future);\n }\n },\n _horizontal: function (from, to, future) {\n var that = this, active = that._active, horizontal = that.options.animation.horizontal, effects = horizontal.effects, viewWidth = outerWidth(from);\n if (effects && effects.indexOf(SLIDE) != -1) {\n from.add(to).css({ width: viewWidth });\n from.wrap('
');\n that._focusView(active, from);\n from.parent().css({\n position: 'relative',\n width: viewWidth * 2,\n 'float': LEFT,\n 'margin-left': future ? 0 : -viewWidth\n });\n to[future ? 'insertAfter' : 'insertBefore'](from);\n extend(horizontal, {\n effects: SLIDE + ':' + (future ? 'right' : LEFT),\n complete: function () {\n from.off(ns).remove();\n that._oldTable = null;\n to.unwrap();\n that._focusView(active);\n }\n });\n from.parent().kendoStop(true, true).kendoAnimate(horizontal);\n }\n },\n _vertical: function (from, to) {\n var that = this, vertical = that.options.animation.vertical, effects = vertical.effects, active = that._active, cell, position;\n if (effects && effects.indexOf('zoom') != -1) {\n to.insertBefore(from);\n from.css({\n position: 'absolute',\n width: to.width()\n });\n if (transitionOrigin) {\n cell = that._cellByDate(that._view.toDateString(that._current));\n position = cell.position();\n position = position.left + parseInt(cell.width() / 2, 10) + 'px' + ' ' + (position.top + parseInt(cell.height() / 2, 10) + 'px');\n to.css(transitionOrigin, position);\n }\n from.kendoStop(true, true).kendoAnimate({\n effects: 'fadeOut',\n duration: 600,\n complete: function () {\n from.off(ns).remove();\n that._oldTable = null;\n that._focusView(active);\n }\n });\n to.kendoStop(true, true).kendoAnimate(vertical);\n }\n },\n _cellByDate: function (value, selector) {\n return this._table.find(selector ? selector : 'td:not(.' + OTHERMONTH + ')').filter(function () {\n return $(this.firstChild).attr(kendo.attr(VALUE)) === value;\n });\n },\n _class: function (className, date) {\n var that = this, id = that._cellID, cell = that._cell, value = that._view.toDateString(date), disabledDate;\n if (cell && cell.length) {\n cell[0].removeAttribute(ARIA_SELECTED);\n cell[0].removeAttribute(ARIA_LABEL);\n cell[0].removeAttribute(ID);\n }\n if (date && that._view.name == 'month') {\n disabledDate = that.options.disableDates(date);\n }\n that._cellsBySelector(that._isMultipleSelection() ? CELLSELECTOR : 'td:not(.' + OTHERMONTH + ')').removeClass(className);\n cell = that._cellByDate(value, that.options.selectable == 'multiple' ? CELLSELECTOR : 'td:not(.' + OTHERMONTH + ')').attr(ARIA_SELECTED, true);\n if (className === FOCUSED && !that._active && that.options.focusOnNav !== false || disabledDate) {\n className = '';\n }\n cell.addClass(className);\n if (cell[0]) {\n that._cell = cell;\n }\n if (id) {\n cell.attr(ID, id);\n that._table[0].removeAttribute('aria-activedescendant');\n that._table.attr('aria-activedescendant', id);\n }\n },\n _bindTable: function (table) {\n table.on(FOCUS_WITH_NS, this._addClassProxy).on(BLUR, this._removeClassProxy);\n },\n _click: function (link) {\n var that = this, options = that.options, currentValue = new Date(+that._current), value = toDateObject(link);\n adjustDST(value, 0);\n if (that._view.name == 'month' && that.options.disableDates(value)) {\n value = that._value;\n }\n that._view.setDate(currentValue, value);\n that.navigateDown(restrictValue(currentValue, options.min, options.max));\n },\n _focus: function (value) {\n var that = this, view = that._view;\n if (view.compare(value, that._current) !== 0) {\n that.navigate(value);\n } else {\n that._current = value;\n that._class(FOCUSED, value);\n }\n },\n _focusView: function (active, table) {\n if (active) {\n this.focus(table);\n }\n },\n _viewWrapper: function () {\n var that = this;\n var element = that.element;\n var viewWrapper = element.children('.k-calendar-view');\n if (!viewWrapper[0]) {\n viewWrapper = $('
').insertAfter(element.find(HEADERSELECTOR));\n }\n },\n _footer: function (template) {\n var that = this, today = getToday(), element = that.element, footer = element.find('.k-footer');\n if (!template) {\n that._toggle(false);\n footer.hide();\n return;\n }\n if (!footer[0]) {\n footer = $('
').appendTo(element);\n }\n that._today = footer.show().find('.k-link').html(template(today)).attr('title', kendo.toString(today, 'D', that.options.culture));\n that._toggle();\n },\n _header: function () {\n var that = this, element = that.element, linksSelector = that.options.linksSelector;\n if (!element.find(HEADERSELECTOR)[0]) {\n element.html(kendo.template(that.options.header.template)($.extend(true, {}, that.options, { actionAttr: kendo.attr('action') })));\n }\n element.find(linksSelector).on(MOUSEENTER_WITH_NS + ' ' + MOUSELEAVE + ' ' + FOCUS_WITH_NS + ' ' + BLUR, mousetoggle).on(CLICK + ' touchend' + ns, function () {\n return false;\n });\n that._title = element.find('[' + kendo.attr('action') + '=\"nav-up\"]').on(CLICK + ' touchend' + ns, function () {\n that._active = that.options.focusOnNav !== false;\n that.navigateUp();\n });\n that[PREVARROW] = element.find('[' + kendo.attr('action') + '=\"prev\"]').on(CLICK + ' touchend' + ns, function () {\n that._active = that.options.focusOnNav !== false;\n that.navigateToPast();\n });\n that[NEXTARROW] = element.find('[' + kendo.attr('action') + '=\"next\"]').on(CLICK + ' touchend' + ns, function () {\n that._active = that.options.focusOnNav !== false;\n that.navigateToFuture();\n });\n element.find('[' + kendo.attr('action') + '=\"today\"]').on(CLICK + ' touchend' + ns, proxy(that._todayClick, that));\n },\n _navigate: function (arrow, modifier) {\n var that = this, index = that._index + 1, currentValue = new DATE(+that._current);\n if (that._isMultipleSelection()) {\n var firstDayCurrentMonth = that._table.find('td:not(.k-other-month):not(.k-out-of-range)').has('.k-link').first();\n currentValue = toDateObject(firstDayCurrentMonth.find('a'));\n that._current = new Date(+currentValue);\n }\n arrow = that[arrow];\n if (!arrow.hasClass(DISABLED)) {\n if (index > 3) {\n currentValue.setFullYear(currentValue.getFullYear() + 100 * modifier);\n } else {\n calendar.views[index].setDate(currentValue, modifier);\n }\n that.navigate(currentValue);\n }\n },\n _option: function (option, value) {\n var that = this, options = that.options, currentValue = that._value || that._current, isBigger;\n if (value === undefined) {\n return options[option];\n }\n value = parse(value, options.format, options.culture);\n if (!value) {\n return;\n }\n options[option] = new DATE(+value);\n if (option === MIN) {\n isBigger = value > currentValue;\n } else {\n isBigger = currentValue > value;\n }\n if (isBigger || isEqualMonth(currentValue, value)) {\n if (isBigger) {\n that._value = null;\n }\n that._changeView = true;\n }\n if (!that._changeView) {\n that._changeView = !!(options.month.content || options.month.empty);\n }\n that.navigate(that._value);\n that._toggle();\n },\n _toggle: function (toggle) {\n var that = this, options = that.options, isTodayDisabled = that.options.disableDates(getToday()), link = that._today;\n if (toggle === undefined) {\n toggle = isInRange(getToday(), options.min, options.max);\n }\n if (link) {\n link.off(CLICK);\n if (toggle && !isTodayDisabled) {\n link.addClass(TODAY).removeClass(DISABLED).on(CLICK, proxy(that._todayClick, that));\n } else {\n link.removeClass(TODAY).addClass(DISABLED).on(CLICK, prevent);\n }\n }\n },\n _todayClick: function (e) {\n var that = this, depth = views[that.options.depth], disabled = that.options.disableDates, today = getToday();\n e.preventDefault();\n if (disabled(today)) {\n return;\n }\n if (that._view.compare(that._current, today) === 0 && that._index == depth) {\n that._changeView = false;\n }\n if (that._isMultipleSelection()) {\n that._selectDates = [today];\n that.selectable._lastActive = null;\n }\n that._value = today;\n that.navigate(today, depth);\n that.trigger(CHANGE);\n },\n _templates: function () {\n var that = this, options = that.options, footer = options.footer, month = options.month, content = month.content, weekNumber = month.weekNumber, empty = month.empty, footerTemplate = '#= kendo.toString(data,\"D\",\"' + options.culture + '\") #';\n that.month = {\n content: template('' + (content || '#=data.value#') + '', { useWithBlock: !!content }),\n empty: template('' + (empty || ' ') + '', { useWithBlock: !!empty }),\n weekNumber: template('' + (weekNumber || '#= data.weekNumber #') + '', { useWithBlock: !!weekNumber })\n };\n if (footer && footer !== true) {\n footerTemplate = footer;\n }\n that.footer = footer !== false ? template(footerTemplate, { useWithBlock: false }) : null;\n }\n });\n ui.plugin(Calendar);\n var calendar = {\n firstDayOfMonth: function (date) {\n return createDate(date.getFullYear(), date.getMonth(), 1);\n },\n firstVisibleDay: function (date, calendarInfo) {\n calendarInfo = calendarInfo || kendo.culture().calendar;\n var firstDay = calendarInfo.firstDay, firstVisibleDay = new DATE(date.getFullYear(), date.getMonth(), 1, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n firstVisibleDay.setFullYear(date.getFullYear());\n while (firstVisibleDay.getDay() != firstDay) {\n calendar.setTime(firstVisibleDay, -1 * MS_PER_DAY);\n }\n return firstVisibleDay;\n },\n setTime: function (date, time) {\n var tzOffsetBefore = date.getTimezoneOffset(), resultDATE = new DATE(date.getTime() + time), tzOffsetDiff = resultDATE.getTimezoneOffset() - tzOffsetBefore;\n date.setTime(resultDATE.getTime() + tzOffsetDiff * MS_PER_MINUTE);\n },\n views: [\n {\n name: MONTH,\n title: function (date, min, max, culture) {\n return getCalendarInfo(culture).months.names[date.getMonth()] + ' ' + date.getFullYear();\n },\n content: function (options) {\n var that = this, idx = 0, min = options.min, max = options.max, date = options.date, dates = options.dates, format = options.format, culture = options.culture, navigateUrl = options.url, showHeader = options.showHeader, otherMonth = options.otherMonth, isWeekColumnVisible = options.isWeekColumnVisible, hasUrl = navigateUrl && dates[0], currentCalendar = getCalendarInfo(culture), firstDayIdx = currentCalendar.firstDay, days = currentCalendar.days, names = shiftArray(days.names, firstDayIdx), shortNames = shiftArray(days.namesShort, firstDayIdx), start = calendar.firstVisibleDay(date, currentCalendar), firstDayOfMonth = that.first(date), lastDayOfMonth = that.last(date), toDateString = that.toDateString, today = getToday(), contentClasses = options.contentClasses, html = '';\n if (showHeader) {\n html += '';\n } else {\n html += '';\n }\n if (isWeekColumnVisible) {\n html += '';\n }\n for (; idx < 7; idx++) {\n html += '';\n }\n adjustDST(today, 0);\n today = +today;\n return view({\n cells: 42,\n perRow: 7,\n html: html += '',\n start: start,\n isWeekColumnVisible: isWeekColumnVisible,\n weekNumber: options.weekNumber,\n min: createDate(min.getFullYear(), min.getMonth(), min.getDate()),\n max: createDate(max.getFullYear(), max.getMonth(), max.getDate()),\n otherMonth: otherMonth,\n content: options.content,\n lastDayOfMonth: lastDayOfMonth,\n empty: options.empty,\n setter: that.setDate,\n disableDates: options.disableDates,\n build: function (date, idx, disableDates) {\n var cssClass = [], day = date.getDay(), linkClass = '', url = '#';\n if (date < firstDayOfMonth || date > lastDayOfMonth) {\n cssClass.push(OTHERMONTH);\n }\n if (disableDates(date)) {\n cssClass.push(DISABLED);\n }\n if (+date === today) {\n cssClass.push('k-today');\n }\n if (day === 0 || day === 6) {\n cssClass.push('k-weekend');\n }\n if (hasUrl && inArray(+date, dates)) {\n url = navigateUrl.replace('{0}', kendo.toString(date, format, culture));\n linkClass = ' k-action-link';\n }\n return {\n date: date,\n dates: dates,\n ns: kendo.ns,\n title: kendo.toString(date, 'D', culture),\n value: date.getDate(),\n dateString: toDateString(date),\n cssClass: cssClass[0] ? ' class=\"' + cssClass.join(' ') + '\"' : '',\n linkClass: linkClass,\n url: url\n };\n },\n weekNumberBuild: function (date) {\n return {\n weekNumber: weekInYear(date, kendo.culture().calendar.firstDay),\n currentDate: date\n };\n }\n });\n },\n first: function (date) {\n return calendar.firstDayOfMonth(date);\n },\n last: function (date) {\n var last = createDate(date.getFullYear(), date.getMonth() + 1, 0), first = calendar.firstDayOfMonth(date), timeOffset = Math.abs(last.getTimezoneOffset() - first.getTimezoneOffset());\n if (timeOffset) {\n last.setHours(first.getHours() + timeOffset / 60);\n }\n return last;\n },\n compare: function (date1, date2) {\n var result, month1 = date1.getMonth(), year1 = date1.getFullYear(), month2 = date2.getMonth(), year2 = date2.getFullYear();\n if (year1 > year2) {\n result = 1;\n } else if (year1 < year2) {\n result = -1;\n } else {\n result = month1 == month2 ? 0 : month1 > month2 ? 1 : -1;\n }\n return result;\n },\n setDate: function (date, value) {\n var hours = date.getHours();\n if (value instanceof DATE) {\n date.setFullYear(value.getFullYear(), value.getMonth(), value.getDate());\n } else {\n calendar.setTime(date, value * MS_PER_DAY);\n }\n adjustDST(date, hours);\n },\n toDateString: function (date) {\n return date.getFullYear() + '/' + date.getMonth() + '/' + date.getDate();\n }\n },\n {\n name: 'year',\n title: function (date) {\n return date.getFullYear();\n },\n content: function (options) {\n var namesAbbr = getCalendarInfo(options.culture).months.namesAbbr, toDateString = this.toDateString, min = options.min, max = options.max, html = '';\n if (options.showHeader) {\n html += '
' + this.title(date, min, max, culture) + '
' + options.messages.weekColumnHeader + '' + shortNames[idx] + '
';\n }\n return view({\n min: createDate(min.getFullYear(), min.getMonth(), 1),\n max: createDate(max.getFullYear(), max.getMonth(), 1),\n start: createDate(options.date.getFullYear(), 0, 1),\n html: html,\n setter: this.setDate,\n build: function (date) {\n return {\n value: namesAbbr[date.getMonth()],\n ns: kendo.ns,\n dateString: toDateString(date),\n cssClass: ''\n };\n }\n });\n },\n first: function (date) {\n return createDate(date.getFullYear(), 0, date.getDate());\n },\n last: function (date) {\n return createDate(date.getFullYear(), 11, date.getDate());\n },\n compare: function (date1, date2) {\n return compare(date1, date2);\n },\n setDate: function (date, value) {\n var month, hours = date.getHours();\n if (value instanceof DATE) {\n month = value.getMonth();\n date.setFullYear(value.getFullYear(), month, date.getDate());\n if (month !== date.getMonth()) {\n date.setDate(0);\n }\n } else {\n month = date.getMonth() + value;\n date.setMonth(month);\n if (month > 11) {\n month -= 12;\n }\n if (month > 0 && date.getMonth() != month) {\n date.setDate(0);\n }\n }\n adjustDST(date, hours);\n },\n toDateString: function (date) {\n return date.getFullYear() + '/' + date.getMonth() + '/1';\n }\n },\n {\n name: 'decade',\n title: function (date, min, max) {\n return title(date, min, max, 10);\n },\n content: function (options) {\n var year = options.date.getFullYear(), toDateString = this.toDateString, html = '';\n if (options.showHeader) {\n html += '
';\n html += this.title(options.date);\n html += '
';\n }\n return view({\n start: createDate(year - year % 10 - 1, 0, 1),\n min: createDate(options.min.getFullYear(), 0, 1),\n max: createDate(options.max.getFullYear(), 0, 1),\n otherMonth: options.otherMonth,\n html: html,\n setter: this.setDate,\n build: function (date, idx) {\n return {\n value: date.getFullYear(),\n ns: kendo.ns,\n dateString: toDateString(date),\n cssClass: idx === 0 || idx == 11 ? OTHERMONTHCLASS : ''\n };\n }\n });\n },\n first: function (date) {\n var year = date.getFullYear();\n return createDate(year - year % 10, date.getMonth(), date.getDate());\n },\n last: function (date) {\n var year = date.getFullYear();\n return createDate(year - year % 10 + 9, date.getMonth(), date.getDate());\n },\n compare: function (date1, date2) {\n return compare(date1, date2, 10);\n },\n setDate: function (date, value) {\n setDate(date, value, 1);\n },\n toDateString: function (date) {\n return date.getFullYear() + '/0/1';\n }\n },\n {\n name: CENTURY,\n title: function (date, min, max) {\n return title(date, min, max, 100);\n },\n content: function (options) {\n var year = options.date.getFullYear(), min = options.min.getFullYear(), max = options.max.getFullYear(), toDateString = this.toDateString, minYear = min, maxYear = max, html = '';\n minYear = minYear - minYear % 10;\n maxYear = maxYear - maxYear % 10;\n if (maxYear - minYear < 10) {\n maxYear = minYear + 9;\n }\n if (options.showHeader) {\n html += '
';\n html += this.title(options.date, options.min, options.max);\n html += '
';\n }\n return view({\n start: createDate(year - year % 100 - 10, 0, 1),\n min: createDate(minYear, 0, 1),\n max: createDate(maxYear, 0, 1),\n otherMonth: options.otherMonth,\n html: html,\n setter: this.setDate,\n build: function (date, idx) {\n var start = date.getFullYear(), end = start + 9;\n if (start < min) {\n start = min;\n }\n if (end > max) {\n end = max;\n }\n return {\n ns: kendo.ns,\n value: start + ' - ' + end,\n dateString: toDateString(date),\n cssClass: idx === 0 || idx == 11 ? OTHERMONTHCLASS : ''\n };\n }\n });\n },\n first: function (date) {\n var year = date.getFullYear();\n return createDate(year - year % 100, date.getMonth(), date.getDate());\n },\n last: function (date) {\n var year = date.getFullYear();\n return createDate(year - year % 100 + 99, date.getMonth(), date.getDate());\n },\n compare: function (date1, date2) {\n return compare(date1, date2, 100);\n },\n setDate: function (date, value) {\n setDate(date, value, 10);\n },\n toDateString: function (date) {\n var year = date.getFullYear();\n return year - year % 10 + '/0/1';\n }\n }\n ]\n };\n function title(date, min, max, modular) {\n var start = date.getFullYear(), minYear = min.getFullYear(), maxYear = max.getFullYear(), end;\n start = start - start % modular;\n end = start + (modular - 1);\n if (start < minYear) {\n start = minYear;\n }\n if (end > maxYear) {\n end = maxYear;\n }\n return start + '-' + end;\n }\n function view(options) {\n var idx = 0, data, min = options.min, max = options.max, start = options.start, setter = options.setter, build = options.build, weekNumberBuild = options.weekNumberBuild, length = options.cells || 12, isWeekColumnVisible = options.isWeekColumnVisible, cellsPerRow = options.perRow || 4, otherMonth = options.otherMonth, lastDayOfMonth = options.lastDayOfMonth, weekNumber = options.weekNumber || weekNumberTemplate, content = options.content || cellTemplate, empty = options.empty || emptyCellTemplate, otherMonthTemplate = options.otherMonthCellTemplate || otherMonthCellTemplate, html = options.html || '
';\n html += this.title(options.date, options.min, options.max);\n html += '
';\n if (isWeekColumnVisible) {\n html += weekNumber(weekNumberBuild(start));\n }\n for (; idx < length; idx++) {\n if (idx > 0 && idx % cellsPerRow === 0) {\n html += '';\n if (isWeekColumnVisible) {\n html += otherMonth || +start <= +lastDayOfMonth ? weekNumber(weekNumberBuild(start)) : weekNumber({ weekNumber: ' ' });\n }\n }\n start = createDate(start.getFullYear(), start.getMonth(), start.getDate());\n adjustDST(start, 0);\n data = build(start, idx, options.disableDates);\n html += data.cssClass.indexOf(OTHERMONTH) !== -1 && !otherMonth ? otherMonthTemplate(data) : isInRange(start, min, max) ? content(data) : empty(data);\n setter(start, 1);\n }\n return html + '
';\n }\n function compare(date1, date2, modifier) {\n var year1 = date1.getFullYear(), start = date2.getFullYear(), end = start, result = 0;\n if (modifier) {\n start = start - start % modifier;\n end = start - start % modifier + modifier - 1;\n }\n if (year1 > end) {\n result = 1;\n } else if (year1 < start) {\n result = -1;\n }\n return result;\n }\n function getToday() {\n var today = new DATE();\n return new DATE(today.getFullYear(), today.getMonth(), today.getDate());\n }\n function restrictValue(value, min, max) {\n var today = getToday();\n if (value) {\n today = new DATE(+value);\n }\n if (min > today) {\n today = new DATE(+min);\n } else if (max < today) {\n today = new DATE(+max);\n }\n return today;\n }\n function isInRange(date, min, max) {\n return +date >= +min && +date <= +max;\n }\n function shiftArray(array, idx) {\n return array.slice(idx).concat(array.slice(0, idx));\n }\n function setDate(date, value, multiplier) {\n value = value instanceof DATE ? value.getFullYear() : date.getFullYear() + multiplier * value;\n date.setFullYear(value);\n }\n function daysBetweenTwoDates(startDate, endDate) {\n if (+endDate < +startDate) {\n var temp = +startDate;\n calendar.views[0].setDate(startDate, endDate);\n calendar.views[0].setDate(endDate, new Date(temp));\n }\n var fromDateUTC = Date.UTC(startDate.getFullYear(), startDate.getMonth(), startDate.getDate());\n var endDateUTC = Date.UTC(endDate.getFullYear(), endDate.getMonth(), endDate.getDate());\n return Math.ceil((+endDateUTC - +fromDateUTC) / kendo.date.MS_PER_DAY);\n }\n function addDaysToArray(array, numberOfDays, fromDate, disableDates) {\n for (var i = 0; i <= numberOfDays; i++) {\n var nextDay = new Date(fromDate.getTime());\n nextDay = new Date(nextDay.setDate(nextDay.getDate() + i));\n if (!disableDates(nextDay)) {\n array.push(nextDay);\n }\n }\n }\n function mousetoggle(e) {\n var disabled = $(this).hasClass('k-state-disabled');\n if (!disabled) {\n $(this).toggleClass(HOVER, MOUSEENTER.indexOf(e.type) > -1 || e.type == FOCUS);\n }\n }\n function prevent(e) {\n e.preventDefault();\n }\n function createDate(year, month, date) {\n var dateObject = new DATE(year, month, date);\n dateObject.setFullYear(year, month, date);\n return dateObject;\n }\n function getCalendarInfo(culture) {\n return getCulture(culture).calendars.standard;\n }\n function normalize(options) {\n var start = views[options.start], depth = views[options.depth], culture = getCulture(options.culture);\n options.format = extractFormat(options.format || culture.calendars.standard.patterns.d);\n if (isNaN(start)) {\n start = 0;\n options.start = MONTH;\n }\n if (depth === undefined || depth > start) {\n options.depth = MONTH;\n }\n if (options.dates === null) {\n options.dates = [];\n }\n }\n function makeUnselectable(element) {\n if (isIE8) {\n element.find('*').attr('unselectable', 'on');\n }\n }\n function addClassToViewContainer(element, currentView) {\n element.addClass('k-' + currentView);\n }\n function inArray(date, dates) {\n for (var i = 0, length = dates.length; i < length; i++) {\n if (date === +dates[i]) {\n return true;\n }\n }\n return false;\n }\n function isEqualDatePart(value1, value2) {\n if (value1) {\n return value1.getFullYear() === value2.getFullYear() && value1.getMonth() === value2.getMonth() && value1.getDate() === value2.getDate();\n }\n return false;\n }\n function isEqualMonth(value1, value2) {\n if (value1) {\n return value1.getFullYear() === value2.getFullYear() && value1.getMonth() === value2.getMonth();\n }\n return false;\n }\n function getDisabledExpr(option) {\n if (kendo.isFunction(option)) {\n return option;\n }\n if ($.isArray(option)) {\n return createDisabledExpr(option);\n }\n return $.noop;\n }\n function convertDatesArray(dates) {\n var result = [];\n for (var i = 0; i < dates.length; i++) {\n result.push(dates[i].setHours(0, 0, 0, 0));\n }\n return result;\n }\n function createDisabledExpr(dates) {\n var body, callback, disabledDates = [], days = [\n 'su',\n 'mo',\n 'tu',\n 'we',\n 'th',\n 'fr',\n 'sa'\n ], searchExpression = 'if (found) {' + ' return true ' + '} else {' + 'return false' + '}';\n if (dates[0] instanceof DATE) {\n disabledDates = convertDatesArray(dates);\n body = 'var found = date && window.kendo.jQuery.inArray(date.setHours(0, 0, 0, 0),[' + disabledDates + ']) > -1;' + searchExpression;\n } else {\n for (var i = 0; i < dates.length; i++) {\n var day = dates[i].slice(0, 2).toLowerCase();\n var index = $.inArray(day, days);\n if (index > -1) {\n disabledDates.push(index);\n }\n }\n body = 'var found = date && window.kendo.jQuery.inArray(date.getDay(),[' + disabledDates + ']) > -1;' + searchExpression;\n }\n callback = new Function('date', body);\n return callback;\n }\n function isEqualDate(oldValue, newValue) {\n if (oldValue instanceof Date && newValue instanceof Date) {\n oldValue = oldValue.getTime();\n newValue = newValue.getTime();\n }\n return oldValue === newValue;\n }\n function toDateObject(link) {\n var value = $(link).attr(kendo.attr(VALUE)).split('/');\n value = createDate(value[0], value[1], value[2]);\n return value;\n }\n calendar.isEqualDatePart = isEqualDatePart;\n calendar.isEqualDate = isEqualDate;\n calendar.makeUnselectable = makeUnselectable;\n calendar.restrictValue = restrictValue;\n calendar.isInRange = isInRange;\n calendar.addClassToViewContainer = addClassToViewContainer;\n calendar.normalize = normalize;\n calendar.viewsEnum = views;\n calendar.disabled = getDisabledExpr;\n calendar.toDateObject = toDateObject;\n calendar.getToday = getToday;\n calendar.createDate = createDate;\n kendo.calendar = calendar;\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}