{"version":3,"sources":["kendo.multiviewcalendar.js"],"names":["f","define","$","undefined","mousetoggle","e","disabled","this","hasClass","toggleClass","HOVER","MOUSEENTER","indexOf","type","FOCUS","addDaysToArray","array","numberOfDays","fromDate","disableDates","i","nextDay","Date","getTime","setDate","getDate","push","daysBetweenTwoDates","startDate","endDate","temp","fromDateUTC","endDateUTC","calendar","views","UTC","getFullYear","getMonth","Math","ceil","kendo","date","MS_PER_DAY","shiftDate","value","dimension","numberOfViews","current","DATE","setFullYear","abs","setMonth","last","window","support","isInRange","toDateObject","createDate","isEqualDate","getToday","keys","ui","Widget","Selectable","template","mobileOS","ns","CLICK","KEYDOWN","ID","MIN","MONTH","DOT","CENTURY","DECADE","CHANGE","NAVIGATE","VALUE","FOCUSED","SELECTED","MID","SPLITEND","SPLITSTART","START","END","DISABLED","TODAY","OTHERMONTH","OUTOFRANGE","CELLSELECTOR","CELLSELECTORVALID","BLUR","touch","MOUSELEAVE_NS","PREVARROW","NEXTARROW","ARIA_SELECTED","INPUTSELECTOR","ARIA_DISABLED","ARIA_LABEL","proxy","month","year","decade","century","RangeSelectable","extend","init","element","options","that","fn","call","userEvents","UserEvents","global","allowSelection","filter","tap","_tap","touchAction","events","name","inputSelectors","multiple","dragToSelect","relatedTarget","noop","destroy","_lastActive","_start","_end","_allowSelection","target","is","cancel","start","addClass","end","mid","elements","tables","find","each","lastCell","firstCell","clear","clearVariables","removeClass","selectFrom","items","startIdx","inArray","index","selectTo","endIdx","range","change","trigger","_toggling","MultiViewCalendar","id","culture","wrapper","getCulture","format","_extractFormat","calendars","standard","patterns","d","_templates","_header","_wrapper","weekNumber","on","_move","_blur","link","currentTarget","firstChild","href","preventDefault","_click","_mouseEnter","attr","_cellID","_calendarWidth","width","_range","_initViews","viewName","_selectable","_footer","footer","_selectDates","selectable","selectDates","length","_restoreSelection","selectRange","notify","min","max","dates","showViewHeader","depth","messages","weekColumnHeader","setOptions","normalize","_views","off","remove","_cell","_currentView","_current","header","_title","rangeSelectable","_today","focus","table","closest","_dateInViews","_cellByDate","first","_option","view","navigateToPast","_navigate","navigateToFuture","navigateUp","_index","navigate","navigateDown","_value","isNaN","viewsEnum","restrictValue","_updateHeader","lastDate","prevDisabled","nextDisabled","title","_firstViewValue","visibleRange","_visibleRange","html","compare","_navContainer","appendTo","cell","preventFocus","prevent","method","lastActive","cellIndex","key","keyCode","focusedCell","currentValue","isRtl","RIGHT","LEFT","UP","DOWN","SPACEBAR","HOME","eq","prev","_focusCell","next","ctrlKey","metaKey","ENTER","_toggleSelection","shiftKey","_nextNavigatable","_selectRange","PAGEUP","PAGEDOWN","_visualizeSelectedDatesInView","cells","selectedDates","toDateString","_selectElement","isDisabled","navigatableDate","event","_unselect","option","isBigger","parseDate","_toggle","toLowerCase","_rangeSelection","aria","parseOptions","_selection","_onRelatedTarget","unselect","_unselecting","_getFirstViewDate","currentView","ranges","_canRenderNextView","viewDate","fullYear","maxYear","maxMonth","viewOptions","_table","content","url","showHeader","isWeekColumnVisible","otherMonth","contentClasses","tablesWrapper","sender","_preventChange","selectElements","domEvent","isCell","_validateValue","_deselect","_addSelectedCellsToArray","item","currentDateIndex","map","Number","splice","firstDateInView","lastDateInView","_fillRange","daysDifference","buttons","prependTo","insertAfter","empty","useWithBlock","today","show","toString","hide","arrow","modifier","offset","originaValue","toggle","isTodayDisabled","_todayClick","adjustDST","_focus","contains","focusTable","cellId","removeAttribute","clearSelection","validSelectedDates","datesUnique","position","time","grep","setHours","startInRange","endInRange","plugin","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,2BACH,aACA,mBACA,kBACDD,IACL,WA84CE,MAl4CC,UAAUE,EAAGC,GAi0CV,QAASC,GAAYC,GACjB,GAAIC,GAAWJ,EAAEK,MAAMC,SAAS,mBAC3BF,IACDJ,EAAEK,MAAME,YAAYC,EAAOC,EAAWC,QAAQP,EAAEQ,UAAcR,EAAEQ,MAAQC,GAGhF,QA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AAKmH,YAAYrE,EAAMlB,MAErDoO,GAAgBC,GAChBjQ,EAAK6G,gBAAgB/D,MAAM9C,EAAKmH,YAAYrE,EAAMpB,OAAQ1B,EAAKmH,YAAYrE,EAAMlB,MAEjFkB,EAAMlB,KAAOoO,IAAiBC,GAC9BjQ,EAAK6G,gBAAgBtE,WAAWvC,EAAKmH,YAAYrE,EAAMpB,SAEtDoB,EAAMlB,KAAOoO,GACdhQ,EAAK6G,gBAAgBnF,MAAM1B,EAAKmH,YAAYrE,EAAMpB,SAEjD8G,EAAa9G,OAASoB,EAAMpB,QAAU8G,EAAa5G,KAAOkB,EAAMlB,KACjE5B,EAAK6G,gBAAgBhF,IAAI7B,EAAKF,QAAQkC,KAAKpD,KApB/CoB,KAwBRtE,GAAMqB,GAAGmT,OAAOhN,KAiElB3G,OAAOb,MAAMyU,QACR5T,OAAOb,OACE,kBAAVvC,SAAwBA,OAAOiX,IAAMjX,OAAS,SAAUkX,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.multiviewcalendar.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.multiviewcalendar', [\n 'kendo.core',\n 'kendo.selectable',\n 'kendo.calendar'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'multiviewcalendar',\n name: 'MultiViewCalendar',\n category: 'web',\n description: 'Multi-view calendar.',\n depends: [\n 'core',\n 'selectable',\n 'calendar'\n ]\n };\n (function ($, undefined) {\n var kendo = window.kendo, calendar = kendo.calendar, support = kendo.support, isInRange = calendar.isInRange, toDateObject = calendar.toDateObject, createDate = calendar.createDate, isEqualDate = calendar.isEqualDate, getToday = calendar.getToday, keys = kendo.keys, ui = kendo.ui, Widget = ui.Widget, Selectable = ui.Selectable, template = kendo.template, mobileOS = support.mobileOS, ns = '.kendoMultiViewCalendar', CLICK = 'click', KEYDOWN = 'keydown', ID = 'id', MIN = 'min', MONTH = 'month', DOT = '.', CENTURY = 'century', DECADE = 'decade', CHANGE = 'change', NAVIGATE = 'navigate', VALUE = 'value', FOCUSED = 'k-state-focused', SELECTED = 'k-state-selected', MID = 'k-range-mid', SPLITEND = 'k-range-split-end', SPLITSTART = 'k-range-split-start', START = 'k-range-start', END = 'k-range-end', HOVER = 'k-state-hover', DISABLED = 'k-state-disabled', TODAY = 'k-nav-today', OTHERMONTH = 'k-other-month', OUTOFRANGE = 'k-out-of-range', CELLSELECTOR = 'td:has(.k-link):not(.' + OUTOFRANGE + ')', CELLSELECTORVALID = 'td:has(.k-link):not(.' + DISABLED + '):not(.' + OUTOFRANGE + ')', BLUR = 'blur', FOCUS = 'focus', MOUSEENTER = support.touch ? 'touchstart' : 'mouseenter', MOUSELEAVE_NS = support.touch ? 'touchend' + ns + ' touchmove' + ns : 'mouseleave' + ns, PREVARROW = '_prevArrow', NEXTARROW = '_nextArrow', ARIA_SELECTED = 'aria-selected', INPUTSELECTOR = 'input,a,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', ARIA_DISABLED = 'aria-disabled', ARIA_LABEL = 'aria-label', proxy = $.proxy, DATE = Date, views = {\n month: 0,\n year: 1,\n decade: 2,\n century: 3\n };\n var RangeSelectable = Widget.extend({\n init: function (element, options) {\n var that = this;\n Widget.fn.init.call(that, element, options);\n that.userEvents = new kendo.UserEvents(that.element, {\n global: true,\n allowSelection: true,\n filter: that.options.filter,\n tap: proxy(that._tap, that),\n touchAction: 'none'\n });\n },\n events: [CHANGE],\n options: {\n name: 'RangeSelectable',\n filter: '>*',\n inputSelectors: INPUTSELECTOR,\n multiple: false,\n dragToSelect: true,\n relatedTarget: $.noop\n },\n destroy: function () {\n var that = this;\n Widget.fn.destroy.call(that);\n that.userEvents.destroy();\n that._lastActive = that.element = that.userEvents = that._start = that._end = null;\n },\n _allowSelection: function (target) {\n if ($(target).is(this.options.inputSelectors)) {\n this.userEvents.cancel();\n return false;\n }\n return true;\n },\n start: function (element) {\n if (element === undefined) {\n return this._start;\n }\n element.addClass(START + ' ' + SELECTED);\n this._start = element;\n },\n end: function (element) {\n if (element === undefined) {\n return this._start;\n }\n element.addClass(END + ' ' + SELECTED);\n this._end = element;\n },\n mid: function (elements) {\n var tables = this.element.find('table.k-month');\n elements.addClass(MID);\n tables.each(function () {\n var that = $(this);\n var lastCell = that.find(CELLSELECTORVALID + ':last');\n var firstCell = that.find(CELLSELECTORVALID + ':first');\n if (lastCell.hasClass(MID)) {\n lastCell.addClass(SPLITEND);\n }\n if (firstCell.hasClass(MID)) {\n firstCell.addClass(SPLITSTART);\n }\n });\n },\n clear: function (clearVariables) {\n this.element.find(CELLSELECTOR).removeClass(END + ' ' + SELECTED + ' ' + START + ' ' + MID + ' ' + SPLITEND + ' ' + SPLITSTART);\n if (clearVariables) {\n this._start = this._end = null;\n }\n },\n selectFrom: function (start) {\n var that = this;\n var items;\n var startIdx;\n items = that.element.find(CELLSELECTOR);\n startIdx = $.inArray($(start)[0], items);\n that.clear();\n that.start(start);\n items = items.filter(function (index) {\n return index > startIdx;\n });\n that.mid(items);\n },\n selectTo: function (end) {\n var that = this;\n var items;\n var endIdx;\n items = that.element.find(CELLSELECTOR);\n endIdx = $.inArray($(end)[0], items);\n that.clear();\n items = items.filter(function (index) {\n return index < endIdx;\n });\n that.mid(items);\n that.end($(end));\n },\n range: function (start, end) {\n var that = this;\n var items;\n var startIdx;\n var endIdx;\n var temp;\n if (start === undefined) {\n return {\n start: that._start,\n end: that._end\n };\n }\n items = that.element.find(CELLSELECTOR);\n startIdx = $.inArray($(start)[0], items);\n endIdx = $.inArray($(end)[0], items);\n if (startIdx > endIdx) {\n temp = end;\n end = start;\n start = temp;\n temp = startIdx;\n startIdx = endIdx;\n endIdx = temp;\n }\n that.clear();\n start.addClass(START + ' ' + SELECTED);\n that._start = start;\n items = items.filter(function (index) {\n return index > startIdx && index < endIdx;\n });\n that.mid(items);\n that.end($(end));\n },\n change: function () {\n this.trigger(CHANGE);\n },\n _tap: function (e) {\n var target = $(e.target), that = this, items, startIdx, endIdx;\n that._lastActive = target;\n if (!that._start) {\n that.start(target);\n that.trigger(CHANGE);\n return;\n }\n if (that._start && !that._end) {\n items = that.element.find(CELLSELECTOR);\n startIdx = $.inArray($(that._start)[0], items);\n endIdx = $.inArray($(target)[0], items);\n if (+toDateObject($(that._start).find('a')) > +toDateObject($(target).find('a'))) {\n that.clear();\n that.start(target);\n that.trigger(CHANGE);\n return;\n }\n items = items.filter(function (index) {\n return index > startIdx && index < endIdx;\n });\n that.mid(items);\n that.end($(target));\n that.trigger(CHANGE);\n return;\n }\n if (that._start && that._end) {\n if (target.hasClass(MID)) {\n if (!that._toggling) {\n that.range(target, that._end);\n } else {\n that.range(that._start, target);\n }\n that._toggling = !that._toggling;\n that.trigger(CHANGE);\n return;\n }\n that._toggling = false;\n that._end = null;\n that.clear();\n that.start(target);\n that.trigger(CHANGE);\n }\n }\n });\n var MultiViewCalendar = Widget.extend({\n init: function (element, options) {\n var that = this;\n var id;\n var culture;\n Widget.fn.init.call(that, element, options);\n element = that.wrapper = that.element;\n options = that.options;\n that.options.disableDates = calendar.disabled(that.options.disableDates);\n culture = kendo.getCulture(options.culture);\n options.format = kendo._extractFormat(options.format || culture.calendars.standard.patterns.d);\n that._templates();\n that._header();\n that._wrapper();\n id = element.addClass('k-widget k-calendar k-calendar-range' + (options.weekNumber ? ' k-week-number' : '')).on(KEYDOWN + ns, 'table.k-content', proxy(that._move, that)).on(BLUR + ns, 'table', proxy(that._blur, that)).on(CLICK + ns, CELLSELECTORVALID, function (e) {\n var link = e.currentTarget.firstChild;\n if (link.href.indexOf('#') != -1) {\n e.preventDefault();\n }\n that._click($(link));\n }).on(MOUSEENTER + ns, CELLSELECTORVALID, proxy(that._mouseEnter, that)).on(MOUSELEAVE_NS, CELLSELECTORVALID, function () {\n $(this).removeClass(HOVER);\n }).attr(ID);\n if (id) {\n that._cellID = id + '_cell_selected';\n }\n that._calendarWidth = that.element.width();\n that._range = options.range;\n that._initViews({\n viewName: options.start,\n value: options.value\n });\n that._selectable();\n that._footer(that.footer);\n that._selectDates = [];\n that.value(options.value);\n if (options.selectable == 'multiple') {\n that._selectDates = options.selectDates.length ? options.selectDates : that._selectDates;\n that._restoreSelection();\n }\n if (options.selectable == 'range') {\n that.selectRange(that._range);\n }\n kendo.notify(that);\n },\n options: {\n name: 'MultiViewCalendar',\n value: null,\n min: new DATE(1900, 0, 1),\n max: new DATE(2099, 11, 31),\n dates: [],\n disableDates: null,\n culture: '',\n footer: '',\n format: '',\n month: {},\n range: {\n start: null,\n end: null\n },\n weekNumber: false,\n views: 2,\n showViewHeader: false,\n selectable: 'single',\n selectDates: [],\n start: MONTH,\n depth: MONTH,\n messages: { weekColumnHeader: '' }\n },\n events: [\n CHANGE,\n NAVIGATE\n ],\n setOptions: function (options) {\n var that = this;\n calendar.normalize(options);\n options.disableDates = calendar.disabled(options.disableDates);\n Widget.fn.setOptions.call(that, options);\n that._selectable();\n that._templates();\n that._footer(that.footer);\n for (var i = 0; i < that._views.length; i++) {\n that._views[i].off(ns).remove();\n }\n that._initViews({\n viewName: options.start,\n value: options.value\n });\n that._range = options.range || {\n start: null,\n end: null\n };\n that._restoreSelection();\n },\n destroy: function () {\n var that = this;\n that._cell = null;\n that._currentView = null;\n that._current = null;\n if (that._views) {\n for (var i = 0; i < that._views.length; i++) {\n that._views[i].off(ns).remove();\n }\n }\n that.element.off(ns);\n if (that.header) {\n that.header.off(ns);\n that._title = null;\n that.header = null;\n }\n if (that.selectable) {\n that.selectable.destroy();\n that.selectable = null;\n }\n if (that.rangeSelectable) {\n that.rangeSelectable.destroy();\n that.rangeSelectable = null;\n }\n if (that._today) {\n kendo.destroy(that._today.off(ns));\n }\n that._views = null;\n Widget.fn.destroy.call(that);\n },\n current: function () {\n return this._current;\n },\n focus: function () {\n var table;\n if (this._cell) {\n this._cell.closest('table').trigger('focus');\n } else if (this._current && this._dateInViews(this._current)) {\n this._cell = this._cellByDate(this._current);\n this._cell.closest('table').trigger('focus');\n } else {\n table = this.element.find('table').first().trigger('focus');\n this._cell = table.find(CELLSELECTORVALID + ':first');\n this._current = toDateObject(this._cell.find('a'));\n }\n this._cell.addClass(FOCUSED);\n },\n min: function (value) {\n return this._option(MIN, value);\n },\n max: function (value) {\n return this._option('max', value);\n },\n view: function () {\n return this._currentView;\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) ? calendar.views[calendar.viewsEnum[view]] : calendar.views[view];\n var that = this;\n var options = that.options;\n var min = options.min;\n var max = options.max;\n if (!value) {\n that._current = value = new DATE(+calendar.restrictValue(value, min, max));\n } else {\n that._current = value;\n }\n if (view === undefined) {\n view = that._currentView;\n }\n that._currentView = view;\n for (var i = 0; i < that._views.length; i++) {\n that._views[i].off(ns).remove();\n }\n that._initViews({\n viewName: view.name,\n value: value\n });\n that._restoreSelection();\n },\n _updateHeader: function () {\n var that = this;\n var view = that._currentView;\n var title = that._title;\n var value = that._firstViewValue;\n var options = that.options;\n var visibleRange = that._visibleRange();\n var culture = options.culture;\n var min = options.min;\n var max = options.max;\n var lastDate;\n var disabled;\n var prevDisabled;\n var nextDisabled;\n if (view.name === DECADE || view.name === CENTURY) {\n lastDate = shiftDate(value, view.name, options.views - 1);\n if (!isInRange(lastDate, min, max)) {\n lastDate = max;\n }\n title.html(view.first(value).getFullYear() + ' - ' + view.last(lastDate).getFullYear());\n } else {\n title.html(view.title(value, min, max, culture) + ' - ' + view.title(shiftDate(value, view.name, options.views - 1), min, max, culture));\n }\n disabled = view.name === CENTURY;\n title.toggleClass(DISABLED, disabled).attr(ARIA_DISABLED, disabled);\n prevDisabled = view.compare(visibleRange.start, that.options.min) < 1;\n nextDisabled = view.compare(visibleRange.end, that.options.max) > -1;\n if (prevDisabled && nextDisabled) {\n if (that._navContainer) {\n that._navContainer.remove();\n that._navContainer = null;\n }\n } else {\n if (!that._navContainer) {\n that._navContainer = $('' + '' + '' + '').appendTo(that.header);\n that[PREVARROW] = that._navContainer.find('.k-prev-view');\n that[NEXTARROW] = that._navContainer.find('.k-next-view');\n }\n that[PREVARROW].toggleClass(DISABLED, prevDisabled).attr(ARIA_DISABLED, prevDisabled);\n if (that[PREVARROW].hasClass(DISABLED)) {\n that[PREVARROW].removeClass(HOVER);\n }\n that[NEXTARROW].toggleClass(DISABLED, nextDisabled).attr(ARIA_DISABLED, nextDisabled);\n if (that[NEXTARROW].hasClass(DISABLED)) {\n that[NEXTARROW].removeClass(HOVER);\n }\n }\n },\n _mouseEnter: function (e) {\n var that = this;\n var cell = $(e.currentTarget);\n var range;\n var items;\n var startIdx;\n var endIdx;\n cell.addClass(HOVER);\n if (that.rangeSelectable && that._currentView.name === 'month') {\n range = that.selectRange();\n if (range.start && !range.end) {\n if (that._dateInViews(that.selectRange().start)) {\n items = that.element.find(that.rangeSelectable.options.filter);\n startIdx = $.inArray($(that.rangeSelectable._start)[0], items);\n endIdx = $.inArray($(cell)[0], items);\n if (startIdx > endIdx) {\n return;\n }\n that.rangeSelectable.range(that.rangeSelectable._start, cell);\n } else if (+toDateObject(that.element.find(CELLSELECTOR + ':first').find('a')) > +range.start) {\n that.rangeSelectable.selectTo(cell);\n }\n that.rangeSelectable._end = null;\n }\n }\n },\n _move: function (e, preventFocus) {\n var that = this;\n var options = that.options;\n var key = e.keyCode;\n var index = that._index;\n var min = options.min;\n var max = options.max;\n var focusedCell = that.element.find(DOT + FOCUSED);\n var table = focusedCell.closest('table');\n var currentValue = new DATE(+(that._current || toDateObject(focusedCell.find('a'))));\n var isRtl = kendo.support.isRtl(that.wrapper);\n var navigate = false;\n var value, prevent, method, cell, lastActive, cellIndex;\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) {\n prevent = true;\n cell = table.find(CELLSELECTORVALID).eq(0);\n if (cell.hasClass(FOCUSED)) {\n table = table.prev();\n if (table.length) {\n that._focusCell(table.find(CELLSELECTORVALID).eq(0));\n } else {\n navigate = that[PREVARROW] && !that[PREVARROW].hasClass(DISABLED);\n that._navigate(PREVARROW, -1, preventFocus);\n that._focusCell(that.element.find('table:first ' + CELLSELECTORVALID + ':first'));\n }\n } else {\n that._focusCell(cell);\n }\n } else if (key == keys.END) {\n prevent = true;\n cell = table.find(CELLSELECTORVALID).last();\n if (cell.hasClass(FOCUSED)) {\n table = table.next();\n if (table.length) {\n that._focusCell(table.find(CELLSELECTORVALID).last());\n } else {\n navigate = that[NEXTARROW] && !that[NEXTARROW].hasClass(DISABLED);\n that._navigate(NEXTARROW, 1, preventFocus);\n that._focusCell(that.element.find('table:last ' + CELLSELECTORVALID + ':last'));\n }\n } else {\n that._focusCell(cell);\n }\n }\n if (e.ctrlKey || e.metaKey) {\n if (key == keys.RIGHT && !isRtl || key == keys.LEFT && isRtl) {\n navigate = that[NEXTARROW] && !that[NEXTARROW].hasClass(DISABLED);\n that._navigate(NEXTARROW, 1, preventFocus);\n prevent = true;\n } else if (key == keys.LEFT && !isRtl || key == keys.RIGHT && isRtl) {\n navigate = that[PREVARROW] && !that[PREVARROW].hasClass(DISABLED);\n that._navigate(PREVARROW, -1, preventFocus);\n prevent = true;\n } else if (key == keys.UP) {\n navigate = !that._title.hasClass(DISABLED);\n that.navigateUp();\n that._focusCell(that._cellByDate(that._current), !preventFocus);\n prevent = true;\n } else if (key == keys.DOWN) {\n if (that._currentView.name === 'month') {\n that.value(currentValue);\n } else {\n that.navigateDown(currentValue);\n that._focusCell(that._cellByDate(that._current), !preventFocus);\n navigate = true;\n }\n prevent = true;\n } else if (key == keys.ENTER || key == keys.SPACEBAR) {\n if (options.selectable === 'multiple') {\n that._toggleSelection(e);\n }\n }\n } else if (e.shiftKey && options.selectable !== 'single') {\n if (value !== undefined || method) {\n if (!method) {\n that._currentView.setDate(currentValue, value);\n }\n if (that._currentView.name !== 'month') {\n return;\n }\n if (options.disableDates(currentValue)) {\n currentValue = that._nextNavigatable(currentValue, value);\n }\n min = createDate(min.getFullYear(), min.getMonth(), min.getDate());\n if (isInRange(currentValue, min, max)) {\n if (!that._dateInViews(currentValue)) {\n if (value > 0) {\n navigate = that[NEXTARROW] && !that[NEXTARROW].hasClass(DISABLED);\n that._navigate(NEXTARROW, 1, preventFocus);\n } else {\n navigate = that[PREVARROW] && !that[PREVARROW].hasClass(DISABLED);\n that._navigate(PREVARROW, -1, preventFocus);\n }\n }\n cell = that._cellByDate(currentValue);\n that._current = currentValue;\n if (that.selectable) {\n that._selectRange(toDateObject((that.selectable._lastActive || focusedCell).find('a')), currentValue);\n if (!that.selectable._lastActive) {\n that.selectable._lastActive = focusedCell;\n }\n that.trigger(CHANGE);\n that._focusCell(cell);\n }\n if (that.rangeSelectable) {\n lastActive = toDateObject((that.rangeSelectable._lastActive || focusedCell).find('a'));\n if (!that._dateInViews(lastActive)) {\n if (+lastActive > +currentValue) {\n that.rangeSelectable._end = that.rangeSelectable._lastActive;\n that.rangeSelectable.selectFrom(cell);\n } else {\n that.rangeSelectable.selectTo(cell);\n }\n } else {\n if (that.rangeSelectable._end && that.rangeSelectable._end.is(DOT + FOCUSED)) {\n that.rangeSelectable._lastActive = that.rangeSelectable._start;\n } else {\n that.rangeSelectable._lastActive = that._cellByDate(lastActive);\n }\n that.rangeSelectable.range(that.rangeSelectable._lastActive, cell);\n }\n that.rangeSelectable.change();\n that._focusCell(cell);\n }\n }\n }\n } else {\n if (key == keys.ENTER || key == keys.SPACEBAR) {\n if (that._currentView.name === 'month') {\n if (that.selectable) {\n that.selectable._lastActive = that._cellByDate(currentValue);\n }\n that.value(currentValue);\n if (that.rangeSelectable) {\n that.rangeSelectable.change();\n }\n } else {\n that._click($(that._cell[0].firstChild), preventFocus);\n }\n prevent = true;\n } else if (key == keys.PAGEUP || key == keys.PAGEDOWN) {\n prevent = true;\n cellIndex = table.find(CELLSELECTORVALID).index(focusedCell);\n table = key == keys.PAGEUP ? table.prev() : table.next();\n if (!table.length) {\n if (key == keys.PAGEUP) {\n navigate = that[PREVARROW] && !that[PREVARROW].hasClass(DISABLED);\n that.navigateToPast();\n table = that.element.find('table:first');\n } else {\n navigate = that[NEXTARROW] && !that[NEXTARROW].hasClass(DISABLED);\n that.navigateToFuture();\n table = that.element.find('table:last');\n }\n }\n cell = table.find(CELLSELECTORVALID).eq(cellIndex);\n if (cell.length) {\n that._focusCell(cell);\n } else {\n that._focusCell(table.find(CELLSELECTORVALID).last());\n }\n }\n if (value || method) {\n if (!method) {\n that._currentView.setDate(currentValue, value);\n }\n min = createDate(min.getFullYear(), min.getMonth(), min.getDate());\n if (isInRange(currentValue, min, max)) {\n if (that.selectable && options.disableDates(currentValue)) {\n currentValue = that._nextNavigatable(currentValue, value);\n }\n if (!that._dateInViews(currentValue)) {\n if (value > 0) {\n navigate = that[NEXTARROW] && !that[NEXTARROW].hasClass(DISABLED);\n that._navigate(NEXTARROW, 1, preventFocus);\n } else {\n navigate = that[PREVARROW] && !that[PREVARROW].hasClass(DISABLED);\n that._navigate(NEXTARROW, -1, preventFocus);\n }\n }\n cell = that._cellByDate(currentValue);\n that._current = currentValue;\n that._focusCell(cell, !preventFocus);\n }\n }\n }\n if (navigate) {\n that.trigger(NAVIGATE);\n }\n if (prevent) {\n e.preventDefault();\n }\n return that._current;\n },\n _visualizeSelectedDatesInView: function () {\n var that = this;\n var selectedDates = {};\n var cells;\n $.each(that._selectDates, function (index, value) {\n selectedDates[kendo.calendar.views[0].toDateString(value)] = value;\n });\n that.selectable.clear();\n cells = that.element.find('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 _nextNavigatable: function (currentValue, value) {\n var that = this;\n var disabled = true;\n var view = that._currentView;\n var min = that.options.min;\n var max = that.options.max;\n var isDisabled = that.options.disableDates;\n var 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 _toggleSelection: function (event) {\n var that = this;\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 _option: function (option, value) {\n var that = this;\n var options = that.options;\n var currentValue = that._value || that._current;\n var isBigger;\n if (value === undefined) {\n return options[option];\n }\n value = kendo.parseDate(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) {\n that._value = null;\n }\n that.navigate(that._value);\n that._toggle();\n },\n _cellByDate: function (value) {\n if (value instanceof Date) {\n value = this._currentView.toDateString(value);\n }\n return this.element.find('table').find('td:not(.' + OTHERMONTH + ')').filter(function () {\n return $(this.firstChild).attr(kendo.attr(VALUE)) === value;\n });\n },\n _selectable: function () {\n var that = this;\n var selectable = that.options.selectable;\n if (that.selectable) {\n that.selectable.destroy();\n that.selectable = null;\n }\n if (that.rangeSelectable) {\n that.rangeSelectable.destroy();\n that.rangeSelectable = null;\n }\n if (selectable.toLowerCase() === 'range') {\n that.rangeSelectable = new RangeSelectable(that.wrapper, {\n filter: 'table.k-month ' + CELLSELECTORVALID,\n change: proxy(that._rangeSelection, that)\n });\n } else {\n that.selectable = new Selectable(that.wrapper, {\n aria: true,\n dragToSelect: false,\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: Selectable.parseOptions(selectable).multiple,\n filter: 'table.k-content ' + CELLSELECTORVALID,\n change: proxy(that._selection, that),\n relatedTarget: proxy(that._onRelatedTarget, that),\n unselect: proxy(that._unselecting, that)\n });\n }\n },\n _onRelatedTarget: function (target) {\n var that = this;\n if (that.selectable.options.multiple && target.is(CELLSELECTORVALID) && target.length > 1) {\n that._focusCell(target.first(), true);\n }\n },\n _getFirstViewDate: function (currentView) {\n var that = this;\n var options = that.options;\n var ranges = [];\n var start;\n var end;\n var current = new Date(+that._current);\n var i;\n for (i = 0; i < options.views; i++) {\n start = currentView.first(current);\n end = currentView.last(current);\n if (+end > +options.max) {\n if (+start <= +options.max) {\n ranges.push({\n start: start,\n end: new Date(+options.max)\n });\n }\n break;\n }\n ranges.push({\n start: start,\n end: end\n });\n current = new Date(+shiftDate(end, currentView.name, 1));\n }\n current = new Date(+that._current);\n for (i = 0; i < options.views; i++) {\n start = currentView.first(current);\n end = currentView.last(current);\n if (+start < +options.min) {\n if (+end >= +options.min) {\n ranges.push({\n start: new Date(+options.min),\n end: end\n });\n }\n break;\n }\n ranges.push({\n start: start,\n end: end\n });\n current = new Date(+shiftDate(start, currentView.name, -1));\n }\n start = ranges[0].start;\n for (i = 0; i < options.views + 1; i++) {\n if (!ranges[i]) {\n break;\n }\n if (+start > +ranges[i].start) {\n start = ranges[i].start;\n }\n }\n return new Date(+start);\n },\n _canRenderNextView: function (viewDate) {\n var fullYear = viewDate.getFullYear();\n var month = viewDate.getMonth();\n var date = viewDate.getDate();\n var max = this.options.max;\n var maxYear = max.getFullYear();\n var maxMonth = max.getMonth();\n if (fullYear < maxYear) {\n return true;\n }\n if (fullYear === maxYear && month < maxMonth) {\n return true;\n }\n if (fullYear === maxYear && month === maxMonth && date < max.getDate()) {\n return true;\n }\n if (fullYear === maxYear && month === maxMonth && date === max.getDate()) {\n return true;\n }\n return false;\n },\n _initViews: function (viewOptions) {\n var that = this;\n var options = that.options;\n var index = calendar.viewsEnum[viewOptions.viewName];\n var currentView = calendar.views[index];\n var viewDate;\n that._current = new DATE(+calendar.restrictValue(viewOptions.value, options.min, options.max));\n that._views = [];\n that._index = index;\n viewDate = that._getFirstViewDate(currentView);\n viewDate.setDate(1);\n that._firstViewValue = new Date(+viewDate);\n for (var i = 0; i < options.views; i++) {\n viewDate = i ? shiftDate(viewDate, currentView.name, 1) : viewDate;\n viewDate.setDate(1);\n if (!that._canRenderNextView(viewDate)) {\n break;\n }\n that._table = $(currentView.content($.extend({\n min: options.min,\n max: options.max,\n date: viewDate,\n url: options.url,\n dates: options.dates,\n format: options.format,\n culture: options.culture,\n disableDates: options.disableDates,\n showHeader: options.showViewHeader,\n isWeekColumnVisible: options.weekNumber,\n otherMonth: options.otherMonth,\n messages: options.messages,\n contentClasses: 'k-content'\n }, that[currentView.name])));\n that._table.appendTo(that.tablesWrapper).addClass('k-' + currentView.name);\n that._views.push(that._table);\n }\n that._currentView = currentView;\n that.tablesWrapper.attr('class', 'k-calendar-view k-calendar-' + currentView.name + 'view');\n that._updateHeader();\n },\n _rangeSelection: function (e) {\n var that = this;\n var range = e.sender.range();\n var start;\n var end;\n if (range.start) {\n start = toDateObject(range.start.find('a'));\n }\n if (range.end) {\n end = toDateObject(range.end.find('a'));\n }\n that._range = {\n start: start,\n end: end\n };\n if (!that._preventChange) {\n that.trigger(CHANGE);\n }\n },\n _selection: function (e) {\n var that = this;\n var selectElements = e.sender.value();\n var domEvent = e.event;\n var currentTarget = $(domEvent && domEvent.currentTarget);\n var isCell = currentTarget.is('td');\n var currentValue;\n if (that.options.selectable === 'single') {\n that._validateValue(selectElements[0] ? toDateObject(selectElements.first().find('a')) : e.sender._lastActive ? toDateObject(e.sender._lastActive.find('a')) : that.value());\n }\n if (that.options.selectable == 'multiple') {\n if (isCell) {\n currentValue = toDateObject(currentTarget.find('a'));\n }\n if (domEvent && domEvent.ctrlKey) {\n if (isCell) {\n if (currentTarget.hasClass(SELECTED)) {\n that._selectDates.push(currentValue);\n } else {\n that._deselect(currentValue);\n }\n } else {\n that.element.find('table ' + CELLSELECTORVALID).each(function (index, element) {\n var value = toDateObject($(element).find('a'));\n that._deselect(value);\n });\n that._addSelectedCellsToArray();\n }\n } else if (domEvent && domEvent.shiftKey) {\n that._selectRange(toDateObject(e.sender._lastActive ? e.sender._lastActive.find('a') : selectElements.first().find('a')), currentValue);\n } else if (isCell) {\n that._selectDates = [];\n that._selectDates.push(currentValue);\n } else {\n that._selectDates = [];\n that._addSelectedCellsToArray();\n }\n }\n if (!that._preventChange) {\n that.trigger(CHANGE);\n }\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 _unselecting: function (e) {\n var that = this;\n var element = e.element;\n if (that.options.selectable === 'single' && !mobileOS && element.hasClass(FOCUSED)) {\n e.preventDefault();\n }\n },\n _visibleRange: function () {\n var tables = this.element.find('.k-calendar-view table');\n var firstDateInView = toDateObject(tables.first().find(CELLSELECTOR + ':first').find('a'));\n var lastDateInView = toDateObject(tables.last().find(CELLSELECTOR + ':last').find('a'));\n return {\n start: firstDateInView,\n end: lastDateInView\n };\n },\n _dateInViews: function (date) {\n var that = this;\n var tables = that.element.find('.k-calendar-view table');\n var firstDateInView = toDateObject(tables.first().find(CELLSELECTOR + ':first').find('a'));\n var lastDateInView = toDateObject(tables.last().find(CELLSELECTOR + ':last').find('a'));\n return +date <= +lastDateInView && +date >= +firstDateInView;\n },\n _fillRange: function (start, end) {\n var that = this;\n var daysDifference;\n that._selectDates = [];\n daysDifference = daysBetweenTwoDates(start, end);\n addDaysToArray(that._selectDates, daysDifference, start, that.options.disableDates);\n },\n _selectRange: function (start, end) {\n var that = this;\n var current;\n if (+end < +start) {\n current = end;\n end = start;\n start = current;\n }\n that._fillRange(start, end);\n that._visualizeSelectedDatesInView();\n },\n _header: function () {\n var that = this;\n var element = that.element;\n var buttons;\n var header = element.find('.k-calendar-header');\n if (!header.length) {\n header = $('
').prependTo(element);\n }\n that.header = header;\n header.on(MOUSEENTER + ns + ' ' + MOUSELEAVE_NS + ' ' + FOCUS + ns + ' ' + BLUR + ns, '.k-button', mousetoggle).on('click', function () {\n return false;\n }).on(CLICK + ns, '.k-button.k-title', function () {\n that.navigateUp();\n that._focusCell(that._cellByDate(that._current), true);\n that.trigger(NAVIGATE);\n }).on(CLICK + ns, '.k-button.k-prev-view', function (e) {\n e.preventDefault();\n that.navigateToPast();\n that.trigger(NAVIGATE);\n }).on(CLICK + ns, '.k-button.k-next-view', function (e) {\n e.preventDefault();\n that.navigateToFuture();\n that.trigger(NAVIGATE);\n });\n buttons = header.find('.k-button');\n that._title = buttons.filter('.k-title');\n that._navContainer = header.find('.k-calendar-nav');\n that[PREVARROW] = buttons.filter('.k-prev-view');\n that[NEXTARROW] = buttons.filter('.k-next-view');\n },\n _wrapper: function () {\n this.tablesWrapper = $('').insertAfter(this.element[0].firstChild);\n },\n _templates: function () {\n var that = this;\n var options = that.options;\n var month = options.month;\n var content = month.content;\n var weekNumber = month.weekNumber;\n var empty = month.empty;\n that.month = {\n content: template('