{"version":3,"sources":["datepicker.min.js"],"names":["global","factory","exports","module","require","define","amd","globalThis","self","jQuery","this","$","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","_createClass","protoProps","staticProps","prototype","typeOf","obj","toString","call","slice","toLowerCase","isString","value","isNumber","isNaN","isUndefined","isDate","getTime","proxy","fn","context","_len","arguments","args","Array","_key","_len2","args2","_key2","apply","concat","selectorOf","view","isLeapYear","year","getDaysInMonth","month","getMinDay","day","Math","min","parseFormat","format","source","String","parts","match","formatParts","Error","each","part","hasDay","hasMonth","hasYear","getScrollParent","element","includeHidden","undefined","$element","position","css","excludeStaticParent","overflowRegex","scrollParent","parents","filter","index","parent","$parent","test","eq","ownerDocument","document","addLeadingZero","str","abs","result","hasOwnProperty","DEFAULTS","autoShow","autoHide","autoPick","inline","container","trigger","language","date","startDate","endDate","startView","weekStart","yearFirst","yearSuffix","days","daysShort","daysMin","months","monthsShort","itemTag","mutedClass","pickedClass","disabledClass","highlightedClass","template","offset","zIndex","show","hide","pick","todayDate","Date","IS_BROWSER","window","WINDOW","IS_TOUCH_DEVICE","documentElement","NAMESPACE","EVENT_CLICK","EVENT_FOCUS","EVENT_HIDE","EVENT_KEYUP","EVENT_PICK","EVENT_RESIZE","EVENT_SCROLL","EVENT_SHOW","EVENT_TOUCH_START","CLASS_HIDE","LANGUAGES","VIEWS","DAYS","MONTHS","YEARS","Number","REGEXP_DIGITS","methods","built","build","shown","isDefaultPrevented","$picker","removeClass","on","click","showView","options","$scrollParent","place","onResize","onGlobalClick","globalClick","onGlobalKeyup","globalKeyup","onTouchStart","touchstart","addClass","off","toggle","update","getValue","oldValue","setDate","_view","$this","formatDate","setValue","isInput","reset","initialDate","initialValue","getMonthName","shortForm","isNumeric","getMonth","getDayName","getDay","getDate","formatted","_updated","parseDate","isFunction","viewDate","render","setStartDate","setEndDate","parseInt","setFullYear","setMonth","getFullYear","values","d","dd","m","mm","yy","substring","yyyy","replace","destroy","unbind","unbuild","removeData","handlers","e","$target","stopPropagation","preventDefault","hasClass","data","viewYear","viewMonth","viewDay","renderYears","renderMonths","siblings","hideView","text","renderDays","inArray","_ref","$trigger","hidden","parentNode","keyup","_ref2","keyCode","_ref3","contains","blur","renderWeek","_this","items","_this$options","push","createItem","$week","html","join","now","thisYear","prevDisabled","nextDisabled","disabled","picked","highlighted","$yearsPrev","toggleClass","$yearsNext","$yearsCurrent","$years","thisMonth","$yearPrev","$yearNext","$yearCurrent","$months","n","currentDate","thisDay","prevItems","prevViewYear","prevViewMonth","firstDay","prevViewDate","muted","nextItems","nextViewYear","nextViewMonth","lastDate","_disabled","_date","_disabled2","_picked","$monthPrev","$monthNext","$monthCurrent","$days","CLASS_TOP_LEFT","CLASS_TOP_RIGHT","CLASS_BOTTOM_LEFT","CLASS_BOTTOM_RIGHT","CLASS_PLACEMENTS","Datepicker","extend","isPlainObject","init","is","bind","find","$yearsPicker","$monthsPicker","$daysPicker","append","body","remove","containerWidth","outerWidth","containerHeight","outerHeight","elementWidth","elementHeight","width","height","_$this$offset","left","top","parseFloat","placement","type","Event","item","classes","val","AnotherDatepicker","datepicker","option","isDestroy","languages","setDefaults","noConflict"],"mappings":"CAUC,SAAUA,EAAQC,GACE,gBAAZC,UAA0C,mBAAXC,QAAyBF,EAAQG,QAAQ,WAC7D,kBAAXC,SAAyBA,OAAOC,IAAMD,QAAQ,UAAWJ,IAC/DD,EAA+B,mBAAfO,YAA6BA,WAAaP,GAAUQ,KAAMP,EAAQD,EAAOS,UAC1FC,KAAM,SAAWC,GAAK,YAItB,SAASC,GAAgBC,EAAUC,GACjC,KAAMD,YAAoBC,IACxB,KAAM,IAAIC,WAAU,qCAIxB,QAASC,GAAkBC,EAAQC,GACjC,IAAK,GAAIC,GAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CACrC,GAAIE,GAAaH,EAAMC,EACvBE,GAAWC,WAAaD,EAAWC,aAAc,EACjDD,EAAWE,cAAe,EACtB,SA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qS,EAAWC,EAEhBzU,GAAEmM,WAAWhK,KACfyD,EAASzD,EAAGU,MAAM2R,EAAYjS,GAE1BmS,GACFhQ,EAAS8I,WAAWpF,OAKpBrG,EAAY6D,GAAmB7F,KAAT6F,GAGhC5F,EAAEmC,GAAGqS,WAAWrU,YAAcqS,EAC9BxS,EAAEmC,GAAGqS,WAAWG,UAAY5L,EAC5B/I,EAAEmC,GAAGqS,WAAWI,YAAcpC,EAAWoC,YAEzC5U,EAAEmC,GAAGqS,WAAWK,WAAa,WAE3B,MADA7U,GAAEmC,GAAGqS,WAAaD,EACXxU","file":"../datepicker.min.js","sourcesContent":["/*!\r\n * Datepicker v1.0.10\r\n * https://fengyuanchen.github.io/datepicker\r\n *\r\n * Copyright 2014-present Chen Fengyuan\r\n * Released under the MIT license\r\n *\r\n * Date: 2020-09-29T14:46:10.983Z\r\n */\r\n\r\n(function (global, factory) {\r\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :\r\n typeof define === 'function' && define.amd ? define(['jquery'], factory) :\r\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));\r\n}(this, (function ($) { 'use strict';\r\n\r\n $ = $ && $.hasOwnProperty('default') ? $['default'] : $;\r\n\r\n function _classCallCheck(instance, Constructor) {\r\n if (!(instance instanceof Constructor)) {\r\n throw new TypeError(\"Cannot call a class as a function\");\r\n }\r\n }\r\n\r\n function _defineProperties(target, props) {\r\n for (var i = 0; i < props.length; i++) {\r\n var descriptor = props[i];\r\n descriptor.enumerable = descriptor.enumerable || false;\r\n descriptor.configurable = true;\r\n if (\"value\" in descriptor) descriptor.writable = true;\r\n Object.defineProperty(target, descriptor.key, descriptor);\r\n }\r\n }\r\n\r\n function _createClass(Constructor, protoProps, staticProps) {\r\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\r\n if (staticProps) _defineProperties(Constructor, staticProps);\r\n return Constructor;\r\n }\r\n\r\n var DEFAULTS = {\r\n // Show the datepicker automatically when initialized\r\n autoShow: false,\r\n // Hide the datepicker automatically when picked\r\n autoHide: false,\r\n // Pick the initial date automatically when initialized\r\n autoPick: false,\r\n // Enable inline mode\r\n inline: false,\r\n // A element (or selector) for putting the datepicker\r\n container: null,\r\n // A element (or selector) for triggering the datepicker\r\n trigger: null,\r\n // The ISO language code (built-in: en-US)\r\n language: '',\r\n // The date string format\r\n format: 'mm/dd/yyyy',\r\n // The initial date\r\n date: null,\r\n // The start view date\r\n startDate: null,\r\n // The end view date\r\n endDate: null,\r\n // The start view when initialized\r\n startView: 0,\r\n // 0 for days, 1 for months, 2 for years\r\n // The start day of the week\r\n // 0 for Sunday, 1 for Monday, 2 for Tuesday, 3 for Wednesday,\r\n // 4 for Thursday, 5 for Friday, 6 for Saturday\r\n weekStart: 0,\r\n // Show year before month on the datepicker header\r\n yearFirst: false,\r\n // A string suffix to the year number.\r\n yearSuffix: '',\r\n // Days' name of the week.\r\n days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\r\n // Shorter days' name\r\n daysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\r\n // Shortest days' name\r\n daysMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\r\n // Months' name\r\n months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\r\n // Shorter months' name\r\n monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\r\n // A element tag for each item of years, months and days\r\n itemTag: 'li',\r\n // A class (CSS) for muted date item\r\n mutedClass: 'muted',\r\n // A class (CSS) for picked date item\r\n pickedClass: 'picked',\r\n // A class (CSS) for disabled date item\r\n disabledClass: 'disabled',\r\n // A class (CSS) for highlight date item\r\n highlightedClass: 'highlighted',\r\n // The template of the datepicker\r\n template: '
' + '
' + '' + '' + '
' + '
' + '' + '' + '
' + '
' + '' + '' + '' + '
' + '
',\r\n // The offset top or bottom of the datepicker from the element\r\n offset: 10,\r\n // The `z-index` of the datepicker\r\n zIndex: 1000,\r\n // Filter each date item (return `false` to disable a date item)\r\n filter: null,\r\n // Event shortcuts\r\n show: null,\r\n hide: null,\r\n pick: null,\r\n todayDate: new Date()\r\n };\r\n\r\n var IS_BROWSER = typeof window !== 'undefined';\r\n var WINDOW = IS_BROWSER ? window : {};\r\n var IS_TOUCH_DEVICE = IS_BROWSER ? 'ontouchstart' in WINDOW.document.documentElement : false;\r\n var NAMESPACE = 'datepicker';\r\n var EVENT_CLICK = \"click.\".concat(NAMESPACE);\r\n var EVENT_FOCUS = \"focus.\".concat(NAMESPACE);\r\n var EVENT_HIDE = \"hide.\".concat(NAMESPACE);\r\n var EVENT_KEYUP = \"keyup.\".concat(NAMESPACE);\r\n var EVENT_PICK = \"pick.\".concat(NAMESPACE);\r\n var EVENT_RESIZE = \"resize.\".concat(NAMESPACE);\r\n var EVENT_SCROLL = \"scroll.\".concat(NAMESPACE);\r\n var EVENT_SHOW = \"show.\".concat(NAMESPACE);\r\n var EVENT_TOUCH_START = \"touchstart.\".concat(NAMESPACE);\r\n var CLASS_HIDE = \"\".concat(NAMESPACE, \"-hide\");\r\n var LANGUAGES = {};\r\n var VIEWS = {\r\n DAYS: 0,\r\n MONTHS: 1,\r\n YEARS: 2\r\n };\r\n\r\n var toString = Object.prototype.toString;\r\n function typeOf(obj) {\r\n return toString.call(obj).slice(8, -1).toLowerCase();\r\n }\r\n function isString(value) {\r\n return typeof value === 'string';\r\n }\r\n var isNaN = Number.isNaN || WINDOW.isNaN;\r\n function isNumber(value) {\r\n return typeof value === 'number' && !isNaN(value);\r\n }\r\n function isUndefined(value) {\r\n return typeof value === 'undefined';\r\n }\r\n function isDate(value) {\r\n return typeOf(value) === 'date' && !isNaN(value.getTime());\r\n }\r\n function proxy(fn, context) {\r\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\r\n args[_key - 2] = arguments[_key];\r\n }\r\n\r\n return function () {\r\n for (var _len2 = arguments.length, args2 = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\r\n args2[_key2] = arguments[_key2];\r\n }\r\n\r\n return fn.apply(context, args.concat(args2));\r\n };\r\n }\r\n function selectorOf(view) {\r\n return \"[data-view=\\\"\".concat(view, \"\\\"]\");\r\n }\r\n function isLeapYear(year) {\r\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\r\n }\r\n function getDaysInMonth(year, month) {\r\n return [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];\r\n }\r\n function getMinDay(year, month, day) {\r\n return Math.min(day, getDaysInMonth(year, month));\r\n }\r\n var formatParts = /(y|m|d)+/g;\r\n function parseFormat(format) {\r\n var source = String(format).toLowerCase();\r\n var parts = source.match(formatParts);\r\n\r\n if (!parts || parts.length === 0) {\r\n throw new Error('Invalid date format.');\r\n }\r\n\r\n format = {\r\n source: source,\r\n parts: parts\r\n };\r\n $.each(parts, function (i, part) {\r\n switch (part) {\r\n case 'dd':\r\n case 'd':\r\n format.hasDay = true;\r\n break;\r\n\r\n case 'mm':\r\n case 'm':\r\n format.hasMonth = true;\r\n break;\r\n\r\n case 'yyyy':\r\n case 'yy':\r\n format.hasYear = true;\r\n break;\r\n }\r\n });\r\n return format;\r\n }\r\n function getScrollParent(element) {\r\n var includeHidden = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\r\n var $element = $(element);\r\n var position = $element.css('position');\r\n var excludeStaticParent = position === 'absolute';\r\n var overflowRegex = includeHidden ? /auto|scroll|hidden/ : /auto|scroll/;\r\n var scrollParent = $element.parents().filter(function (index, parent) {\r\n var $parent = $(parent);\r\n\r\n if (excludeStaticParent && $parent.css('position') === 'static') {\r\n return false;\r\n }\r\n\r\n return overflowRegex.test($parent.css('overflow') + $parent.css('overflow-y') + $parent.css('overflow-x'));\r\n }).eq(0);\r\n return position === 'fixed' || !scrollParent.length ? $(element.ownerDocument || document) : scrollParent;\r\n }\r\n /**\r\n * Add leading zeroes to the given value\r\n * @param {number} value - The value to add.\r\n * @param {number} [length=1] - The expected value length.\r\n * @returns {string} Returns converted value.\r\n */\r\n\r\n function addLeadingZero(value) {\r\n var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\r\n var str = String(Math.abs(value));\r\n var i = str.length;\r\n var result = '';\r\n\r\n if (value < 0) {\r\n result += '-';\r\n }\r\n\r\n while (i < length) {\r\n i += 1;\r\n result += '0';\r\n }\r\n\r\n return result + str;\r\n }\r\n\r\n var REGEXP_DIGITS = /\\d+/g;\r\n var methods = {\r\n // Show the datepicker\r\n show: function show() {\r\n if (!this.built) {\r\n this.build();\r\n }\r\n\r\n if (this.shown) {\r\n return;\r\n }\r\n\r\n if (this.trigger(EVENT_SHOW).isDefaultPrevented()) {\r\n return;\r\n }\r\n\r\n this.shown = true;\r\n this.$picker.removeClass(CLASS_HIDE).on(EVENT_CLICK, $.proxy(this.click, this));\r\n this.showView(this.options.startView);\r\n\r\n if (!this.inline) {\r\n this.$scrollParent.on(EVENT_SCROLL, $.proxy(this.place, this));\r\n $(window).on(EVENT_RESIZE, this.onResize = proxy(this.place, this));\r\n $(document).on(EVENT_CLICK, this.onGlobalClick = proxy(this.globalClick, this));\r\n $(document).on(EVENT_KEYUP, this.onGlobalKeyup = proxy(this.globalKeyup, this));\r\n\r\n if (IS_TOUCH_DEVICE) {\r\n $(document).on(EVENT_TOUCH_START, this.onTouchStart = proxy(this.touchstart, this));\r\n }\r\n\r\n this.place();\r\n }\r\n },\r\n // Hide the datepicker\r\n hide: function hide() {\r\n if (!this.shown) {\r\n return;\r\n }\r\n\r\n if (this.trigger(EVENT_HIDE).isDefaultPrevented()) {\r\n return;\r\n }\r\n\r\n this.shown = false;\r\n this.$picker.addClass(CLASS_HIDE).off(EVENT_CLICK, this.click);\r\n\r\n if (!this.inline) {\r\n this.$scrollParent.off(EVENT_SCROLL, this.place);\r\n $(window).off(EVENT_RESIZE, this.onResize);\r\n $(document).off(EVENT_CLICK, this.onGlobalClick);\r\n $(document).off(EVENT_KEYUP, this.onGlobalKeyup);\r\n\r\n if (IS_TOUCH_DEVICE) {\r\n $(document).off(EVENT_TOUCH_START, this.onTouchStart);\r\n }\r\n }\r\n },\r\n toggle: function toggle() {\r\n if (this.shown) {\r\n this.hide();\r\n } else {\r\n this.show();\r\n }\r\n },\r\n // Update the datepicker with the current input value\r\n update: function update() {\r\n var value = this.getValue();\r\n\r\n if (value === this.oldValue) {\r\n return;\r\n }\r\n\r\n this.setDate(value, true);\r\n this.oldValue = value;\r\n },\r\n\r\n /**\r\n * Pick the current date to the element\r\n *\r\n * @param {String} _view (private)\r\n */\r\n pick: function pick(_view) {\r\n var $this = this.$element;\r\n var date = this.date;\r\n\r\n if (this.trigger(EVENT_PICK, {\r\n view: _view || '',\r\n date: date\r\n }).isDefaultPrevented()) {\r\n return;\r\n }\r\n\r\n date = this.formatDate(this.date);\r\n this.setValue(date);\r\n\r\n if (this.isInput) {\r\n $this.trigger('input');\r\n $this.trigger('change');\r\n }\r\n },\r\n // Reset the datepicker\r\n reset: function reset() {\r\n this.setDate(this.initialDate, true);\r\n this.setValue(this.initialValue);\r\n\r\n if (this.shown) {\r\n this.showView(this.options.startView);\r\n }\r\n },\r\n\r\n /**\r\n * Get the month name with given argument or the current date\r\n *\r\n * @param {Number} month (optional)\r\n * @param {Boolean} shortForm (optional)\r\n * @return {String} (month name)\r\n */\r\n getMonthName: function getMonthName(month, shortForm) {\r\n var options = this.options;\r\n var monthsShort = options.monthsShort;\r\n var months = options.months;\r\n\r\n if ($.isNumeric(month)) {\r\n month = Number(month);\r\n } else if (isUndefined(shortForm)) {\r\n shortForm = month;\r\n }\r\n\r\n if (shortForm === true) {\r\n months = monthsShort;\r\n }\r\n\r\n return months[isNumber(month) ? month : this.date.getMonth()];\r\n },\r\n\r\n /**\r\n * Get the day name with given argument or the current date\r\n *\r\n * @param {Number} day (optional)\r\n * @param {Boolean} shortForm (optional)\r\n * @param {Boolean} min (optional)\r\n * @return {String} (day name)\r\n */\r\n getDayName: function getDayName(day, shortForm, min) {\r\n var options = this.options;\r\n var days = options.days;\r\n\r\n if ($.isNumeric(day)) {\r\n day = Number(day);\r\n } else {\r\n if (isUndefined(min)) {\r\n min = shortForm;\r\n }\r\n\r\n if (isUndefined(shortForm)) {\r\n shortForm = day;\r\n }\r\n }\r\n\r\n if (min) {\r\n days = options.daysMin;\r\n } else if (shortForm) {\r\n days = options.daysShort;\r\n }\r\n\r\n return days[isNumber(day) ? day : this.date.getDay()];\r\n },\r\n\r\n /**\r\n * Get the current date\r\n *\r\n * @param {Boolean} formatted (optional)\r\n * @return {Date|String} (date)\r\n */\r\n getDate: function getDate(formatted) {\r\n var date = this.date;\r\n return formatted ? this.formatDate(date) : new Date(date);\r\n },\r\n\r\n /**\r\n * Set the current date with a new date\r\n *\r\n * @param {Date} date\r\n * @param {Boolean} _updated (private)\r\n */\r\n setDate: function setDate(date, _updated) {\r\n var filter = this.options.filter;\r\n\r\n if (isDate(date) || isString(date)) {\r\n date = this.parseDate(date);\r\n\r\n if ($.isFunction(filter) && filter.call(this.$element, date, 'day') === false) {\r\n return;\r\n }\r\n\r\n this.date = date;\r\n this.viewDate = new Date(date);\r\n\r\n if (!_updated) {\r\n this.pick();\r\n }\r\n\r\n if (this.built) {\r\n this.render();\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Set the start view date with a new date\r\n *\r\n * @param {Date|string|null} date\r\n */\r\n setStartDate: function setStartDate(date) {\r\n if (isDate(date) || isString(date)) {\r\n this.startDate = this.parseDate(date);\r\n } else {\r\n this.startDate = null;\r\n }\r\n\r\n if (this.built) {\r\n this.render();\r\n }\r\n },\r\n\r\n /**\r\n * Set the end view date with a new date\r\n *\r\n * @param {Date|string|null} date\r\n */\r\n setEndDate: function setEndDate(date) {\r\n if (isDate(date) || isString(date)) {\r\n this.endDate = this.parseDate(date);\r\n } else {\r\n this.endDate = null;\r\n }\r\n\r\n if (this.built) {\r\n this.render();\r\n }\r\n },\r\n\r\n /**\r\n * Parse a date string with the set date format\r\n *\r\n * @param {String} date\r\n * @return {Date} (parsed date)\r\n */\r\n parseDate: function parseDate(date) {\r\n var format = this.format;\r\n var parts = [];\r\n\r\n if (!isDate(date)) {\r\n if (isString(date)) {\r\n parts = date.match(REGEXP_DIGITS) || [];\r\n }\r\n\r\n date = date ? new Date(date) : new Date();\r\n\r\n if (!isDate(date)) {\r\n date = new Date();\r\n }\r\n\r\n if (parts.length === format.parts.length) {\r\n // Set year and month first\r\n $.each(parts, function (i, part) {\r\n var value = parseInt(part, 10);\r\n\r\n switch (format.parts[i]) {\r\n case 'yy':\r\n date.setFullYear(2000 + value);\r\n break;\r\n\r\n case 'yyyy':\r\n // Converts 2-digit year to 2000+\r\n date.setFullYear(part.length === 2 ? 2000 + value : value);\r\n break;\r\n\r\n case 'mm':\r\n case 'm':\r\n date.setMonth(value - 1);\r\n break;\r\n }\r\n }); // Set day in the last to avoid converting `31/10/2019` to `01/10/2019`\r\n\r\n $.each(parts, function (i, part) {\r\n var value = parseInt(part, 10);\r\n\r\n switch (format.parts[i]) {\r\n case 'dd':\r\n case 'd':\r\n date.setDate(value);\r\n break;\r\n }\r\n });\r\n }\r\n } // Ignore hours, minutes, seconds and milliseconds to avoid side effect (#192)\r\n\r\n\r\n return new Date(date.getFullYear(), date.getMonth(), date.getDate());\r\n },\r\n\r\n /**\r\n * Format a date object to a string with the set date format\r\n *\r\n * @param {Date} date\r\n * @return {String} (formatted date)\r\n */\r\n formatDate: function formatDate(date) {\r\n var format = this.format;\r\n var formatted = '';\r\n\r\n if (isDate(date)) {\r\n var year = date.getFullYear();\r\n var month = date.getMonth();\r\n var day = date.getDate();\r\n var values = {\r\n d: day,\r\n dd: addLeadingZero(day, 2),\r\n m: month + 1,\r\n mm: addLeadingZero(month + 1, 2),\r\n yy: String(year).substring(2),\r\n yyyy: addLeadingZero(year, 4)\r\n };\r\n formatted = format.source;\r\n $.each(format.parts, function (i, part) {\r\n formatted = formatted.replace(part, values[part]);\r\n });\r\n }\r\n\r\n return formatted;\r\n },\r\n // Destroy the datepicker and remove the instance from the target element\r\n destroy: function destroy() {\r\n this.unbind();\r\n this.unbuild();\r\n this.$element.removeData(NAMESPACE);\r\n }\r\n };\r\n\r\n var handlers = {\r\n click: function click(e) {\r\n var $target = $(e.target);\r\n var options = this.options,\r\n date = this.date,\r\n viewDate = this.viewDate,\r\n format = this.format;\r\n e.stopPropagation();\r\n e.preventDefault();\r\n\r\n if ($target.hasClass('disabled')) {\r\n return;\r\n }\r\n\r\n var view = $target.data('view');\r\n var viewYear = viewDate.getFullYear();\r\n var viewMonth = viewDate.getMonth();\r\n var viewDay = viewDate.getDate();\r\n\r\n switch (view) {\r\n case 'years prev':\r\n case 'years next':\r\n {\r\n viewYear = view === 'years prev' ? viewYear - 10 : viewYear + 10;\r\n viewDate.setFullYear(viewYear);\r\n viewDate.setDate(getMinDay(viewYear, viewMonth, viewDay));\r\n this.renderYears();\r\n break;\r\n }\r\n\r\n case 'year prev':\r\n case 'year next':\r\n viewYear = view === 'year prev' ? viewYear - 1 : viewYear + 1;\r\n viewDate.setFullYear(viewYear);\r\n viewDate.setDate(getMinDay(viewYear, viewMonth, viewDay));\r\n this.renderMonths();\r\n break;\r\n\r\n case 'year current':\r\n if (format.hasYear) {\r\n this.showView(VIEWS.YEARS);\r\n }\r\n\r\n break;\r\n\r\n case 'year picked':\r\n if (format.hasMonth) {\r\n this.showView(VIEWS.MONTHS);\r\n } else {\r\n $target.siblings(\".\".concat(options.pickedClass)).removeClass(options.pickedClass).data('view', 'year');\r\n this.hideView();\r\n }\r\n\r\n this.pick('year');\r\n break;\r\n\r\n case 'year':\r\n viewYear = parseInt($target.text(), 10); // Set date first to avoid month changing (#195)\r\n\r\n date.setDate(getMinDay(viewYear, viewMonth, viewDay));\r\n date.setFullYear(viewYear);\r\n viewDate.setDate(getMinDay(viewYear, viewMonth, viewDay));\r\n viewDate.setFullYear(viewYear);\r\n\r\n if (format.hasMonth) {\r\n this.showView(VIEWS.MONTHS);\r\n } else {\r\n $target.addClass(options.pickedClass).data('view', 'year picked').siblings(\".\".concat(options.pickedClass)).removeClass(options.pickedClass).data('view', 'year');\r\n this.hideView();\r\n }\r\n\r\n this.pick('year');\r\n break;\r\n\r\n case 'month prev':\r\n case 'month next':\r\n viewMonth = view === 'month prev' ? viewMonth - 1 : viewMonth + 1;\r\n\r\n if (viewMonth < 0) {\r\n viewYear -= 1;\r\n viewMonth += 12;\r\n } else if (viewMonth > 11) {\r\n viewYear += 1;\r\n viewMonth -= 12;\r\n }\r\n\r\n viewDate.setFullYear(viewYear);\r\n viewDate.setDate(getMinDay(viewYear, viewMonth, viewDay));\r\n viewDate.setMonth(viewMonth);\r\n this.renderDays();\r\n break;\r\n\r\n case 'month current':\r\n if (format.hasMonth) {\r\n this.showView(VIEWS.MONTHS);\r\n }\r\n\r\n break;\r\n\r\n case 'month picked':\r\n if (format.hasDay) {\r\n this.showView(VIEWS.DAYS);\r\n } else {\r\n $target.siblings(\".\".concat(options.pickedClass)).removeClass(options.pickedClass).data('view', 'month');\r\n this.hideView();\r\n }\r\n\r\n this.pick('month');\r\n break;\r\n\r\n case 'month':\r\n viewMonth = $.inArray($target.text(), options.monthsShort);\r\n date.setFullYear(viewYear); // Set date before month to avoid month changing (#195)\r\n\r\n date.setDate(getMinDay(viewYear, viewMonth, viewDay));\r\n date.setMonth(viewMonth);\r\n viewDate.setFullYear(viewYear);\r\n viewDate.setDate(getMinDay(viewYear, viewMonth, viewDay));\r\n viewDate.setMonth(viewMonth);\r\n\r\n if (format.hasDay) {\r\n this.showView(VIEWS.DAYS);\r\n } else {\r\n $target.addClass(options.pickedClass).data('view', 'month picked').siblings(\".\".concat(options.pickedClass)).removeClass(options.pickedClass).data('view', 'month');\r\n this.hideView();\r\n }\r\n\r\n this.pick('month');\r\n break;\r\n\r\n case 'day prev':\r\n case 'day next':\r\n case 'day':\r\n if (view === 'day prev') {\r\n viewMonth -= 1;\r\n } else if (view === 'day next') {\r\n viewMonth += 1;\r\n }\r\n\r\n viewDay = parseInt($target.text(), 10); // Set date to 1 to avoid month changing (#195)\r\n\r\n date.setDate(1);\r\n date.setFullYear(viewYear);\r\n date.setMonth(viewMonth);\r\n date.setDate(viewDay);\r\n viewDate.setDate(1);\r\n viewDate.setFullYear(viewYear);\r\n viewDate.setMonth(viewMonth);\r\n viewDate.setDate(viewDay);\r\n this.renderDays();\r\n\r\n if (view === 'day') {\r\n this.hideView();\r\n }\r\n\r\n this.pick('day');\r\n break;\r\n\r\n case 'day picked':\r\n this.hideView();\r\n this.pick('day');\r\n break;\r\n }\r\n },\r\n globalClick: function globalClick(_ref) {\r\n var target = _ref.target;\r\n var element = this.element,\r\n $trigger = this.$trigger;\r\n var trigger = $trigger[0];\r\n var hidden = true;\r\n\r\n while (target !== document) {\r\n if (target === trigger || target === element) {\r\n hidden = false;\r\n break;\r\n }\r\n\r\n target = target.parentNode;\r\n }\r\n\r\n if (hidden) {\r\n this.hide();\r\n }\r\n },\r\n keyup: function keyup() {\r\n this.update();\r\n },\r\n globalKeyup: function globalKeyup(_ref2) {\r\n var target = _ref2.target,\r\n key = _ref2.key,\r\n keyCode = _ref2.keyCode;\r\n\r\n if (this.isInput && target !== this.element && this.shown && (key === 'Tab' || keyCode === 9)) {\r\n this.hide();\r\n }\r\n },\r\n touchstart: function touchstart(_ref3) {\r\n var target = _ref3.target;\r\n\r\n // Emulate click in touch devices to support hiding the picker automatically (#197).\r\n if (this.isInput && target !== this.element && !$.contains(this.$picker[0], target)) {\r\n this.hide();\r\n this.element.blur();\r\n }\r\n }\r\n };\r\n\r\n var render = {\r\n render: function render() {\r\n this.renderYears();\r\n this.renderMonths();\r\n this.renderDays();\r\n },\r\n renderWeek: function renderWeek() {\r\n var _this = this;\r\n\r\n var items = [];\r\n var _this$options = this.options,\r\n weekStart = _this$options.weekStart,\r\n daysMin = _this$options.daysMin;\r\n weekStart = parseInt(weekStart, 10) % 7;\r\n daysMin = daysMin.slice(weekStart).concat(daysMin.slice(0, weekStart));\r\n $.each(daysMin, function (i, day) {\r\n items.push(_this.createItem({\r\n text: day\r\n }));\r\n });\r\n this.$week.html(items.join(''));\r\n },\r\n renderYears: function renderYears() {\r\n var options = this.options,\r\n startDate = this.startDate,\r\n endDate = this.endDate;\r\n var disabledClass = options.disabledClass,\r\n filter = options.filter,\r\n yearSuffix = options.yearSuffix;\r\n var viewYear = this.viewDate.getFullYear();\r\n //var now = new Date();\r\n var now = options.todayDate;\r\n var thisYear = now.getFullYear();\r\n var year = this.date.getFullYear();\r\n var start = -5;\r\n var end = 6;\r\n var items = [];\r\n var prevDisabled = false;\r\n var nextDisabled = false;\r\n var i;\r\n\r\n for (i = start; i <= end; i += 1) {\r\n var date = new Date(viewYear + i, 1, 1);\r\n var disabled = false;\r\n\r\n if (startDate) {\r\n disabled = date.getFullYear() < startDate.getFullYear();\r\n\r\n if (i === start) {\r\n prevDisabled = disabled;\r\n }\r\n }\r\n\r\n if (!disabled && endDate) {\r\n disabled = date.getFullYear() > endDate.getFullYear();\r\n\r\n if (i === end) {\r\n nextDisabled = disabled;\r\n }\r\n }\r\n\r\n if (!disabled && filter) {\r\n disabled = filter.call(this.$element, date, 'year') === false;\r\n }\r\n\r\n var picked = viewYear + i === year;\r\n var view = picked ? 'year picked' : 'year';\r\n items.push(this.createItem({\r\n picked: picked,\r\n disabled: disabled,\r\n text: viewYear + i,\r\n view: disabled ? 'year disabled' : view,\r\n highlighted: date.getFullYear() === thisYear\r\n }));\r\n }\r\n\r\n this.$yearsPrev.toggleClass(disabledClass, prevDisabled);\r\n this.$yearsNext.toggleClass(disabledClass, nextDisabled);\r\n this.$yearsCurrent.toggleClass(disabledClass, true).html(\"\".concat(viewYear + start + yearSuffix, \" - \").concat(viewYear + end).concat(yearSuffix));\r\n this.$years.html(items.join(''));\r\n },\r\n renderMonths: function renderMonths() {\r\n var options = this.options,\r\n startDate = this.startDate,\r\n endDate = this.endDate,\r\n viewDate = this.viewDate;\r\n var disabledClass = options.disabledClass || '';\r\n var months = options.monthsShort;\r\n var filter = $.isFunction(options.filter) && options.filter;\r\n var viewYear = viewDate.getFullYear();\r\n //var now = new Date();\r\n var now = options.todayDate;\r\n var thisYear = now.getFullYear();\r\n var thisMonth = now.getMonth();\r\n var year = this.date.getFullYear();\r\n var month = this.date.getMonth();\r\n var items = [];\r\n var prevDisabled = false;\r\n var nextDisabled = false;\r\n var i;\r\n\r\n for (i = 0; i <= 11; i += 1) {\r\n var date = new Date(viewYear, i, 1);\r\n var disabled = false;\r\n\r\n if (startDate) {\r\n prevDisabled = date.getFullYear() === startDate.getFullYear();\r\n disabled = prevDisabled && date.getMonth() < startDate.getMonth();\r\n }\r\n\r\n if (!disabled && endDate) {\r\n nextDisabled = date.getFullYear() === endDate.getFullYear();\r\n disabled = nextDisabled && date.getMonth() > endDate.getMonth();\r\n }\r\n\r\n if (!disabled && filter) {\r\n disabled = filter.call(this.$element, date, 'month') === false;\r\n }\r\n\r\n var picked = viewYear === year && i === month;\r\n var view = picked ? 'month picked' : 'month';\r\n items.push(this.createItem({\r\n disabled: disabled,\r\n picked: picked,\r\n highlighted: viewYear === thisYear && date.getMonth() === thisMonth,\r\n index: i,\r\n text: months[i],\r\n view: disabled ? 'month disabled' : view\r\n }));\r\n }\r\n\r\n this.$yearPrev.toggleClass(disabledClass, prevDisabled);\r\n this.$yearNext.toggleClass(disabledClass, nextDisabled);\r\n this.$yearCurrent.toggleClass(disabledClass, prevDisabled && nextDisabled).html(viewYear + options.yearSuffix || '');\r\n this.$months.html(items.join(''));\r\n },\r\n renderDays: function renderDays() {\r\n var $element = this.$element,\r\n options = this.options,\r\n startDate = this.startDate,\r\n endDate = this.endDate,\r\n viewDate = this.viewDate,\r\n currentDate = this.date;\r\n var disabledClass = options.disabledClass,\r\n filter = options.filter,\r\n months = options.months,\r\n weekStart = options.weekStart,\r\n yearSuffix = options.yearSuffix;\r\n var viewYear = viewDate.getFullYear();\r\n var viewMonth = viewDate.getMonth();\r\n //var now = new Date();\r\n var now = options.todayDate;\r\n var thisYear = now.getFullYear();\r\n var thisMonth = now.getMonth();\r\n var thisDay = now.getDate();\r\n var year = currentDate.getFullYear();\r\n var month = currentDate.getMonth();\r\n var day = currentDate.getDate();\r\n var length;\r\n var i;\r\n var n; // Days of prev month\r\n // -----------------------------------------------------------------------\r\n\r\n var prevItems = [];\r\n var prevViewYear = viewYear;\r\n var prevViewMonth = viewMonth;\r\n var prevDisabled = false;\r\n\r\n if (viewMonth === 0) {\r\n prevViewYear -= 1;\r\n prevViewMonth = 11;\r\n } else {\r\n prevViewMonth -= 1;\r\n } // The length of the days of prev month\r\n\r\n\r\n length = getDaysInMonth(prevViewYear, prevViewMonth); // The first day of current month\r\n\r\n var firstDay = new Date(viewYear, viewMonth, 1); // The visible length of the days of prev month\r\n // [0,1,2,3,4,5,6] - [0,1,2,3,4,5,6] => [-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6]\r\n\r\n n = firstDay.getDay() - parseInt(weekStart, 10) % 7; // [-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6] => [1,2,3,4,5,6,7]\r\n\r\n if (n <= 0) {\r\n n += 7;\r\n }\r\n\r\n if (startDate) {\r\n prevDisabled = firstDay.getTime() <= startDate.getTime();\r\n }\r\n\r\n for (i = length - (n - 1); i <= length; i += 1) {\r\n var prevViewDate = new Date(prevViewYear, prevViewMonth, i);\r\n var disabled = false;\r\n\r\n if (startDate) {\r\n disabled = prevViewDate.getTime() < startDate.getTime();\r\n }\r\n\r\n if (!disabled && filter) {\r\n disabled = filter.call($element, prevViewDate, 'day') === false;\r\n }\r\n\r\n prevItems.push(this.createItem({\r\n disabled: disabled,\r\n highlighted: prevViewYear === thisYear && prevViewMonth === thisMonth && prevViewDate.getDate() === thisDay,\r\n muted: true,\r\n picked: prevViewYear === year && prevViewMonth === month && i === day,\r\n text: i,\r\n view: 'day prev'\r\n }));\r\n } // Days of next month\r\n // -----------------------------------------------------------------------\r\n\r\n\r\n var nextItems = [];\r\n var nextViewYear = viewYear;\r\n var nextViewMonth = viewMonth;\r\n var nextDisabled = false;\r\n\r\n if (viewMonth === 11) {\r\n nextViewYear += 1;\r\n nextViewMonth = 0;\r\n } else {\r\n nextViewMonth += 1;\r\n } // The length of the days of current month\r\n\r\n\r\n length = getDaysInMonth(viewYear, viewMonth); // The visible length of next month (42 means 6 rows and 7 columns)\r\n\r\n n = 42 - (prevItems.length + length); // The last day of current month\r\n\r\n var lastDate = new Date(viewYear, viewMonth, length);\r\n\r\n if (endDate) {\r\n nextDisabled = lastDate.getTime() >= endDate.getTime();\r\n }\r\n\r\n for (i = 1; i <= n; i += 1) {\r\n var date = new Date(nextViewYear, nextViewMonth, i);\r\n var picked = nextViewYear === year && nextViewMonth === month && i === day;\r\n var _disabled = false;\r\n\r\n if (endDate) {\r\n _disabled = date.getTime() > endDate.getTime();\r\n }\r\n\r\n if (!_disabled && filter) {\r\n _disabled = filter.call($element, date, 'day') === false;\r\n }\r\n\r\n nextItems.push(this.createItem({\r\n disabled: _disabled,\r\n picked: picked,\r\n highlighted: nextViewYear === thisYear && nextViewMonth === thisMonth && date.getDate() === thisDay,\r\n muted: true,\r\n text: i,\r\n view: 'day next'\r\n }));\r\n } // Days of current month\r\n // -----------------------------------------------------------------------\r\n\r\n\r\n var items = [];\r\n\r\n for (i = 1; i <= length; i += 1) {\r\n var _date = new Date(viewYear, viewMonth, i);\r\n\r\n var _disabled2 = false;\r\n\r\n if (startDate) {\r\n _disabled2 = _date.getTime() < startDate.getTime();\r\n }\r\n\r\n if (!_disabled2 && endDate) {\r\n _disabled2 = _date.getTime() > endDate.getTime();\r\n }\r\n\r\n if (!_disabled2 && filter) {\r\n _disabled2 = filter.call($element, _date, 'day') === false;\r\n }\r\n\r\n var _picked = viewYear === year && viewMonth === month && i === day;\r\n\r\n var view = _picked ? 'day picked' : 'day';\r\n items.push(this.createItem({\r\n disabled: _disabled2,\r\n picked: _picked,\r\n highlighted: viewYear === thisYear && viewMonth === thisMonth && _date.getDate() === thisDay,\r\n text: i,\r\n view: _disabled2 ? 'day disabled' : view\r\n }));\r\n } // Render days picker\r\n // -----------------------------------------------------------------------\r\n\r\n\r\n this.$monthPrev.toggleClass(disabledClass, prevDisabled);\r\n this.$monthNext.toggleClass(disabledClass, nextDisabled);\r\n this.$monthCurrent.toggleClass(disabledClass, prevDisabled && nextDisabled).html(options.yearFirst ? \"\".concat(viewYear + yearSuffix, \" \").concat(months[viewMonth]) : \"\".concat(months[viewMonth], \" \").concat(viewYear).concat(yearSuffix));\r\n this.$days.html(prevItems.join('') + items.join('') + nextItems.join(''));\r\n }\r\n };\r\n\r\n var CLASS_TOP_LEFT = \"\".concat(NAMESPACE, \"-top-left\");\r\n var CLASS_TOP_RIGHT = \"\".concat(NAMESPACE, \"-top-right\");\r\n var CLASS_BOTTOM_LEFT = \"\".concat(NAMESPACE, \"-bottom-left\");\r\n var CLASS_BOTTOM_RIGHT = \"\".concat(NAMESPACE, \"-bottom-right\");\r\n var CLASS_PLACEMENTS = [CLASS_TOP_LEFT, CLASS_TOP_RIGHT, CLASS_BOTTOM_LEFT, CLASS_BOTTOM_RIGHT].join(' ');\r\n\r\n var Datepicker = /*#__PURE__*/function () {\r\n function Datepicker(element) {\r\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\r\n\r\n _classCallCheck(this, Datepicker);\r\n\r\n this.$element = $(element);\r\n this.element = element;\r\n this.options = $.extend({}, DEFAULTS, LANGUAGES[options.language], $.isPlainObject(options) && options);\r\n this.$scrollParent = getScrollParent(element, true);\r\n this.built = false;\r\n this.shown = false;\r\n this.isInput = false;\r\n this.inline = false;\r\n this.initialValue = '';\r\n this.initialDate = null;\r\n this.startDate = null;\r\n this.endDate = null;\r\n this.init();\r\n }\r\n\r\n _createClass(Datepicker, [{\r\n key: \"init\",\r\n value: function init() {\r\n var $this = this.$element,\r\n options = this.options;\r\n var startDate = options.startDate,\r\n endDate = options.endDate,\r\n date = options.date;\r\n this.$trigger = $(options.trigger);\r\n this.isInput = $this.is('input') || $this.is('textarea');\r\n this.inline = options.inline && (options.container || !this.isInput);\r\n this.format = parseFormat(options.format);\r\n var initialValue = this.getValue();\r\n this.initialValue = initialValue;\r\n this.oldValue = initialValue;\r\n date = this.parseDate(date || initialValue);\r\n\r\n if (startDate) {\r\n startDate = this.parseDate(startDate);\r\n\r\n if (date.getTime() < startDate.getTime()) {\r\n date = new Date(startDate);\r\n }\r\n\r\n this.startDate = startDate;\r\n }\r\n\r\n if (endDate) {\r\n endDate = this.parseDate(endDate);\r\n\r\n if (startDate && endDate.getTime() < startDate.getTime()) {\r\n endDate = new Date(startDate);\r\n }\r\n\r\n if (date.getTime() > endDate.getTime()) {\r\n date = new Date(endDate);\r\n }\r\n\r\n this.endDate = endDate;\r\n }\r\n\r\n this.date = date;\r\n this.viewDate = new Date(date);\r\n this.initialDate = new Date(this.date);\r\n this.bind();\r\n\r\n if (options.autoShow || this.inline) {\r\n this.show();\r\n }\r\n\r\n if (options.autoPick) {\r\n this.pick();\r\n }\r\n }\r\n }, {\r\n key: \"build\",\r\n value: function build() {\r\n if (this.built) {\r\n return;\r\n }\r\n\r\n this.built = true;\r\n var $this = this.$element,\r\n options = this.options;\r\n var $picker = $(options.template);\r\n this.$picker = $picker;\r\n this.$week = $picker.find(selectorOf('week')); // Years view\r\n\r\n this.$yearsPicker = $picker.find(selectorOf('years picker'));\r\n this.$yearsPrev = $picker.find(selectorOf('years prev'));\r\n this.$yearsNext = $picker.find(selectorOf('years next'));\r\n this.$yearsCurrent = $picker.find(selectorOf('years current'));\r\n this.$years = $picker.find(selectorOf('years')); // Months view\r\n\r\n this.$monthsPicker = $picker.find(selectorOf('months picker'));\r\n this.$yearPrev = $picker.find(selectorOf('year prev'));\r\n this.$yearNext = $picker.find(selectorOf('year next'));\r\n this.$yearCurrent = $picker.find(selectorOf('year current'));\r\n this.$months = $picker.find(selectorOf('months')); // Days view\r\n\r\n this.$daysPicker = $picker.find(selectorOf('days picker'));\r\n this.$monthPrev = $picker.find(selectorOf('month prev'));\r\n this.$monthNext = $picker.find(selectorOf('month next'));\r\n this.$monthCurrent = $picker.find(selectorOf('month current'));\r\n this.$days = $picker.find(selectorOf('days'));\r\n\r\n if (this.inline) {\r\n $(options.container || $this).append($picker.addClass(\"\".concat(NAMESPACE, \"-inline\")));\r\n } else {\r\n $(document.body).append($picker.addClass(\"\".concat(NAMESPACE, \"-dropdown\")));\r\n $picker.addClass(CLASS_HIDE).css({\r\n zIndex: parseInt(options.zIndex, 10)\r\n });\r\n }\r\n\r\n this.renderWeek();\r\n }\r\n }, {\r\n key: \"unbuild\",\r\n value: function unbuild() {\r\n if (!this.built) {\r\n return;\r\n }\r\n\r\n this.built = false;\r\n this.$picker.remove();\r\n }\r\n }, {\r\n key: \"bind\",\r\n value: function bind() {\r\n var options = this.options,\r\n $this = this.$element;\r\n\r\n if ($.isFunction(options.show)) {\r\n $this.on(EVENT_SHOW, options.show);\r\n }\r\n\r\n if ($.isFunction(options.hide)) {\r\n $this.on(EVENT_HIDE, options.hide);\r\n }\r\n\r\n if ($.isFunction(options.pick)) {\r\n $this.on(EVENT_PICK, options.pick);\r\n }\r\n\r\n if (this.isInput) {\r\n $this.on(EVENT_KEYUP, $.proxy(this.keyup, this));\r\n }\r\n\r\n if (!this.inline) {\r\n if (options.trigger) {\r\n this.$trigger.on(EVENT_CLICK, $.proxy(this.toggle, this));\r\n } else if (this.isInput) {\r\n $this.on(EVENT_FOCUS, $.proxy(this.show, this));\r\n } else {\r\n $this.on(EVENT_CLICK, $.proxy(this.show, this));\r\n }\r\n }\r\n }\r\n }, {\r\n key: \"unbind\",\r\n value: function unbind() {\r\n var $this = this.$element,\r\n options = this.options;\r\n\r\n if ($.isFunction(options.show)) {\r\n $this.off(EVENT_SHOW, options.show);\r\n }\r\n\r\n if ($.isFunction(options.hide)) {\r\n $this.off(EVENT_HIDE, options.hide);\r\n }\r\n\r\n if ($.isFunction(options.pick)) {\r\n $this.off(EVENT_PICK, options.pick);\r\n }\r\n\r\n if (this.isInput) {\r\n $this.off(EVENT_KEYUP, this.keyup);\r\n }\r\n\r\n if (!this.inline) {\r\n if (options.trigger) {\r\n this.$trigger.off(EVENT_CLICK, this.toggle);\r\n } else if (this.isInput) {\r\n $this.off(EVENT_FOCUS, this.show);\r\n } else {\r\n $this.off(EVENT_CLICK, this.show);\r\n }\r\n }\r\n }\r\n }, {\r\n key: \"showView\",\r\n value: function showView(view) {\r\n var $yearsPicker = this.$yearsPicker,\r\n $monthsPicker = this.$monthsPicker,\r\n $daysPicker = this.$daysPicker,\r\n format = this.format;\r\n\r\n if (format.hasYear || format.hasMonth || format.hasDay) {\r\n switch (Number(view)) {\r\n case VIEWS.YEARS:\r\n $monthsPicker.addClass(CLASS_HIDE);\r\n $daysPicker.addClass(CLASS_HIDE);\r\n\r\n if (format.hasYear) {\r\n this.renderYears();\r\n $yearsPicker.removeClass(CLASS_HIDE);\r\n this.place();\r\n } else {\r\n this.showView(VIEWS.DAYS);\r\n }\r\n\r\n break;\r\n\r\n case VIEWS.MONTHS:\r\n $yearsPicker.addClass(CLASS_HIDE);\r\n $daysPicker.addClass(CLASS_HIDE);\r\n\r\n if (format.hasMonth) {\r\n this.renderMonths();\r\n $monthsPicker.removeClass(CLASS_HIDE);\r\n this.place();\r\n } else {\r\n this.showView(VIEWS.YEARS);\r\n }\r\n\r\n break;\r\n // case VIEWS.DAYS:\r\n\r\n default:\r\n $yearsPicker.addClass(CLASS_HIDE);\r\n $monthsPicker.addClass(CLASS_HIDE);\r\n\r\n if (format.hasDay) {\r\n this.renderDays();\r\n $daysPicker.removeClass(CLASS_HIDE);\r\n this.place();\r\n } else {\r\n this.showView(VIEWS.MONTHS);\r\n }\r\n\r\n }\r\n }\r\n }\r\n }, {\r\n key: \"hideView\",\r\n value: function hideView() {\r\n if (!this.inline && this.options.autoHide) {\r\n this.hide();\r\n }\r\n }\r\n }, {\r\n key: \"place\",\r\n value: function place() {\r\n if (this.inline) {\r\n return;\r\n }\r\n\r\n var $this = this.$element,\r\n options = this.options,\r\n $picker = this.$picker;\r\n var containerWidth = $(document).outerWidth();\r\n var containerHeight = $(document).outerHeight();\r\n var elementWidth = $this.outerWidth();\r\n var elementHeight = $this.outerHeight();\r\n var width = $picker.width();\r\n var height = $picker.height();\r\n\r\n var _$this$offset = $this.offset(),\r\n left = _$this$offset.left,\r\n top = _$this$offset.top;\r\n\r\n var offset = parseFloat(options.offset);\r\n var placement = CLASS_TOP_LEFT;\r\n\r\n if (isNaN(offset)) {\r\n offset = 10;\r\n }\r\n\r\n if (top > height && top + elementHeight + height > containerHeight) {\r\n top -= height + offset;\r\n placement = CLASS_BOTTOM_LEFT;\r\n } else {\r\n top += elementHeight + offset;\r\n }\r\n\r\n if (left + width > containerWidth) {\r\n left += elementWidth - width;\r\n placement = placement.replace('left', 'right');\r\n }\r\n\r\n $picker.removeClass(CLASS_PLACEMENTS).addClass(placement).css({\r\n top: top,\r\n left: left\r\n });\r\n } // A shortcut for triggering custom events\r\n\r\n }, {\r\n key: \"trigger\",\r\n value: function trigger(type, data) {\r\n var e = $.Event(type, data);\r\n this.$element.trigger(e);\r\n return e;\r\n }\r\n }, {\r\n key: \"createItem\",\r\n value: function createItem(data) {\r\n var options = this.options;\r\n var itemTag = options.itemTag;\r\n var item = {\r\n text: '',\r\n view: '',\r\n muted: false,\r\n picked: false,\r\n disabled: false,\r\n highlighted: false\r\n };\r\n var classes = [];\r\n $.extend(item, data);\r\n\r\n if (item.muted) {\r\n classes.push(options.mutedClass);\r\n }\r\n\r\n if (item.highlighted) {\r\n classes.push(options.highlightedClass);\r\n }\r\n\r\n if (item.picked) {\r\n classes.push(options.pickedClass);\r\n }\r\n\r\n if (item.disabled) {\r\n classes.push(options.disabledClass);\r\n }\r\n\r\n return \"<\".concat(itemTag, \" class=\\\"\").concat(classes.join(' '), \"\\\" data-view=\\\"\").concat(item.view, \"\\\">\").concat(item.text, \"\");\r\n }\r\n }, {\r\n key: \"getValue\",\r\n value: function getValue() {\r\n var $this = this.$element;\r\n return this.isInput ? $this.val() : $this.text();\r\n }\r\n }, {\r\n key: \"setValue\",\r\n value: function setValue() {\r\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\r\n var $this = this.$element;\r\n\r\n if (this.isInput) {\r\n $this.val(value);\r\n } else if (!this.inline || this.options.container) {\r\n $this.text(value);\r\n }\r\n }\r\n }], [{\r\n key: \"setDefaults\",\r\n value: function setDefaults() {\r\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\r\n $.extend(DEFAULTS, LANGUAGES[options.language], $.isPlainObject(options) && options);\r\n }\r\n }]);\r\n\r\n return Datepicker;\r\n }();\r\n\r\n if ($.extend) {\r\n $.extend(Datepicker.prototype, render, handlers, methods);\r\n }\r\n\r\n if ($.fn) {\r\n var AnotherDatepicker = $.fn.datepicker;\r\n\r\n $.fn.datepicker = function jQueryDatepicker(option) {\r\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\r\n args[_key - 1] = arguments[_key];\r\n }\r\n\r\n var result;\r\n this.each(function (i, element) {\r\n var $element = $(element);\r\n var isDestroy = option === 'destroy';\r\n var datepicker = $element.data(NAMESPACE);\r\n\r\n if (!datepicker) {\r\n if (isDestroy) {\r\n return;\r\n }\r\n\r\n var options = $.extend({}, $element.data(), $.isPlainObject(option) && option);\r\n datepicker = new Datepicker(element, options);\r\n $element.data(NAMESPACE, datepicker);\r\n }\r\n\r\n if (isString(option)) {\r\n var fn = datepicker[option];\r\n\r\n if ($.isFunction(fn)) {\r\n result = fn.apply(datepicker, args);\r\n\r\n if (isDestroy) {\r\n $element.removeData(NAMESPACE);\r\n }\r\n }\r\n }\r\n });\r\n return !isUndefined(result) ? result : this;\r\n };\r\n\r\n $.fn.datepicker.Constructor = Datepicker;\r\n $.fn.datepicker.languages = LANGUAGES;\r\n $.fn.datepicker.setDefaults = Datepicker.setDefaults;\r\n\r\n $.fn.datepicker.noConflict = function noConflict() {\r\n $.fn.datepicker = AnotherDatepicker;\r\n return this;\r\n };\r\n }\r\n\r\n})));\r\n"]}