(function (root, factory) { 'use strict'; if (typeof exports === 'object') { module.exports = factory(); } else if (typeof define === 'function' && define.amd) { define(function (req) { return factory(); }); } else { root.Pikaday = factory(); } } (this, function () { 'use strict'; var document = window.document, getName = function (i) { return i < 10 ? '0' + i : i; }, isLeapYear = function (year) { return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; }, getDaysInMonth = function (year, month) { return [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; }, Pikaday = function (opts) { var data = '{"2023":{"1":{"2":true},"3":{"18":true},"4":{"3":true},"7":{"25":true},"8":{"17":true,"29":true}},"2024":{"0":{"1":true},"1":{"9":true}}}'; this.data = JSON.parse(data); window.pdata = this.data; this.weekdays = ['S', 'M', 'T', 'W', 'T', 'F', 'S']; this.mons = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; this.container = document.getElementById('calendar_wrap'); this.time = this.container.getAttribute('time') || ''; if (!this.time.length) { this.date = new Date(); } else { this.date = new Date(this.time); } this.year = this.date.getFullYear(); this.month = this.date.getMonth(); this.months = this.month + 1; this.days = getDaysInMonth(this.year, this.month); var tmp = new Date(this.year, this.month, 1); this.before = tmp.getDay(); this.draw(); }; Pikaday.prototype = { draw: function () { var title = '