diff --git a/Gruntfile.js b/Gruntfile.js index a6d13e5..abe5ff8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -3,7 +3,7 @@ module.exports = function(grunt) var sBanner = '/* ----------------------------------------------------------------------------- ' + '\n\n jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile' + '\n Version <%= pkg.version %>' + - '\n Copyright (c)<%= grunt.template.today("yyyy") %> Lajpat Shah' + + '\n Copyright (c)2014-<%= grunt.template.today("yyyy") %> Lajpat Shah' + '\n Contributors : https://github.com/nehakadam/DateTimePicker/contributors' + '\n Repository : https://github.com/nehakadam/DateTimePicker' + '\n Documentation : https://nehakadam.github.io/DateTimePicker' + @@ -23,12 +23,12 @@ module.exports = function(grunt) options: { separator: '\n\n\n\n', - stripBanners: true, + stripBanners: true, banner: sBanner }, - src: ['src/i18n/*', '!src/i18n/DateTimePicker-i18n.js'], - dest: 'src/i18n/DateTimePicker-i18n.js', + src: ['src/i18n/*', '!src/i18n/DateTimePicker-i18n.js'], + dest: 'src/i18n/DateTimePicker-i18n.js', nonull: true } }, @@ -59,8 +59,8 @@ module.exports = function(grunt) { banner: sBanner, compress: { - drop_console: true - } + drop_console: true + } }, build: { @@ -98,12 +98,10 @@ module.exports = function(grunt) options: { strict: false, - curly: false, - - eqeqeq: true, - eqnull: true, - browser: true, + eqeqeq: true, + eqnull: true, + browser: true, devel: true, //unused: true, //undef: true, @@ -111,14 +109,14 @@ module.exports = function(grunt) globals: { $: false, - jQuery: false, - define: false, - require: false, - module: false, - DateTimePicker: true - }, - - force: true + jQuery: false, + define: false, + require: false, + module: false, + DateTimePicker: true + }, + + force: true } }, @@ -147,8 +145,9 @@ module.exports = function(grunt) grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-csslint'); - // Default task(s). - grunt.registerTask('default', ['uglify', 'cssmin', 'copy']); - grunt.registerTask('lang', ['concat:lang', 'copy:lang']); - grunt.registerTask('lint', ['jshint', 'csslint']); + // Default task(s). + // + grunt.registerTask('default', ['uglify', 'cssmin', 'copy']); + grunt.registerTask('lang', ['concat:lang', 'copy:lang']); + grunt.registerTask('lint', ['jshint', 'csslint']); }; \ No newline at end of file diff --git a/dist/DateTimePicker-Zepto.js b/dist/DateTimePicker-Zepto.js index 636fd72..0e6cd7f 100755 --- a/dist/DateTimePicker-Zepto.js +++ b/dist/DateTimePicker-Zepto.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.17 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://nehakadam.github.io/DateTimePicker Documentation : https://github.com/nehakadam/DateTimePicker diff --git a/dist/DateTimePicker-ltie9.css b/dist/DateTimePicker-ltie9.css index 2f65bf2..b0fbd70 100755 --- a/dist/DateTimePicker-ltie9.css +++ b/dist/DateTimePicker-ltie9.css @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/DateTimePicker-ltie9.js b/dist/DateTimePicker-ltie9.js index b166570..3c9ffac 100755 --- a/dist/DateTimePicker-ltie9.js +++ b/dist/DateTimePicker-ltie9.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/DateTimePicker-ltie9.min.css b/dist/DateTimePicker-ltie9.min.css index a37e6ac..2006950 100644 --- a/dist/DateTimePicker-ltie9.min.css +++ b/dist/DateTimePicker-ltie9.min.css @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/DateTimePicker-ltie9.min.js b/dist/DateTimePicker-ltie9.min.js index 26fb8b5..2aeea77 100644 --- a/dist/DateTimePicker-ltie9.min.js +++ b/dist/DateTimePicker-ltie9.min.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/DateTimePicker.css b/dist/DateTimePicker.css index af0338f..afbe65f 100755 --- a/dist/DateTimePicker.css +++ b/dist/DateTimePicker.css @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/DateTimePicker.js b/dist/DateTimePicker.js index 97fde5f..2adceeb 100644 --- a/dist/DateTimePicker.js +++ b/dist/DateTimePicker.js @@ -1,3007 +1,3008 @@ -/* ----------------------------------------------------------------------------- - - jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.38 - Copyright (c)2017 Lajpat Shah - Contributors : https://github.com/nehakadam/DateTimePicker/contributors - Repository : https://github.com/nehakadam/DateTimePicker - Documentation : https://nehakadam.github.io/DateTimePicker - - ----------------------------------------------------------------------------- */ - -/* Support Object.keys in IE8 */ -if(!Object.keys) -{ - Object.keys = function(obj) - { - var keys = []; - - for (var i in obj) - { - if (obj.hasOwnProperty(i)) - { - keys.push(i); - } - } - - return keys; - }; -} - -$.DateTimePicker = $.DateTimePicker || { - - name: "DateTimePicker", - - i18n: {}, // Internationalization Objects - - defaults: //Plugin Defaults - { - mode: "date", - defaultDate: null, - - dateSeparator: "-", - timeSeparator: ":", - timeMeridiemSeparator: " ", - dateTimeSeparator: " ", - monthYearSeparator: " ", - - dateTimeFormat: "dd-MM-yyyy HH:mm", - dateFormat: "dd-MM-yyyy", - timeFormat: "HH:mm", - - maxDate: null, - minDate: null, - - maxTime: null, - minTime: null, - - maxDateTime: null, - minDateTime: null, - - shortDayNames: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], - fullDayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], - shortMonthNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], - fullMonthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], - labels: null, /*{"year": "Year", "month": "Month", "day": "Day", "hour": "Hour", "minutes": "Minutes", "seconds": "Seconds", "meridiem": "Meridiem"}*/ - - minuteInterval: 1, - roundOffMinutes: true, - - secondsInterval: 1, - roundOffSeconds: true, - - showHeader: true, - titleContentDate: "Set Date", - titleContentTime: "Set Time", - titleContentDateTime: "Set Date & Time", - - buttonsToDisplay: ["HeaderCloseButton", "SetButton", "ClearButton"], - setButtonContent: "Set", - clearButtonContent: "Clear", - incrementButtonContent: "+", - decrementButtonContent: "-", - setValueInTextboxOnEveryClick: false, - readonlyInputs: false, - - animationDuration: 400, - - touchHoldInterval: 300, // in Milliseconds - captureTouchHold: false, // capture Touch Hold Event - - mouseHoldInterval: 50, // in Milliseconds - captureMouseHold: false, // capture Mouse Hold Event - - isPopup: true, - parentElement: "body", - - isInline: false, - inputElement: null, - - language: "", - - init: null, // init(oDateTimePicker) - addEventHandlers: null, // addEventHandlers(oDateTimePicker) - beforeShow: null, // beforeShow(oInputElement) - afterShow: null, // afterShow(oInputElement) - beforeHide: null, // beforeHide(oInputElement) - afterHide: null, // afterHide(oInputElement) - buttonClicked: null, // buttonClicked(sButtonType, oInputElement) where sButtonType = "SET"|"CLEAR"|"CANCEL"|"TAB" - settingValueOfElement: null, // settingValueOfElement(sValue, dDateTime, oInputElement) - formatHumanDate: null, // formatHumanDate(oDateTime, sMode, sFormat) - - parseDateTimeString: null, // parseDateTimeString(sDateTime, sMode, sFormat, oInputField) - formatDateTimeString: null // formatDateTimeString(oDateTime, sMode, sFormat, oInputField) - }, - - dataObject: // Temporary Variables For Calculation Specific to DateTimePicker Instance - { - - dCurrentDate: new Date(), - iCurrentDay: 0, - iCurrentMonth: 0, - iCurrentYear: 0, - iCurrentHour: 0, - iCurrentMinutes: 0, - iCurrentSeconds: 0, - sCurrentMeridiem: "", - iMaxNumberOfDays: 0, - - sDateFormat: "", - sTimeFormat: "", - sDateTimeFormat: "", - - dMinValue: null, - dMaxValue: null, - - sArrInputDateFormats: [], - sArrInputTimeFormats: [], - sArrInputDateTimeFormats: [], - - bArrMatchFormat: [], - bDateMode: false, - bTimeMode: false, - bDateTimeMode: false, - - oInputElement: null, - - iTabIndex: 0, - bElemFocused: false, - - bIs12Hour: false, - - sTouchButton: null, - iTouchStart: null, - oTimeInterval: null, - bIsTouchDevice: "ontouchstart" in document.documentElement - } - -}; - -$.cf = { - - _isValid: function(sValue) - { - return (sValue !== undefined && sValue !== null && sValue !== ""); - }, - - _compare: function(sString1, sString2) - { - var bString1 = (sString1 !== undefined && sString1 !== null), - bString2 = (sString2 !== undefined && sString2 !== null); - if(bString1 && bString2) - { - if(sString1.toLowerCase() === sString2.toLowerCase()) - return true; - else - return false; - } - else - return false; - } - -}; - -(function (factory) -{ - if(typeof define === "function" && define.amd) - { - // AMD. Register as an anonymous module. - define(["jquery"], factory); - } - else if(typeof exports === "object") - { - // Node/CommonJS - module.exports = factory(require("jquery")); - } - else - { - // Browser globals - factory(jQuery); - } -}(function ($) -{ - "use strict"; - - function DateTimePicker(element, options) - { - this.element = element; - - var sLanguage = ""; - sLanguage = ($.cf._isValid(options) && $.cf._isValid(options.language)) ? options.language : $.DateTimePicker.defaults.language; - this.settings = $.extend({}, $.DateTimePicker.defaults, $.DateTimePicker.i18n[sLanguage], options); - this.options = options; - - this.oData = $.extend({}, $.DateTimePicker.dataObject); - this._defaults = $.DateTimePicker.defaults; - this._name = $.DateTimePicker.name; - - this.init(); - } - - $.fn.DateTimePicker = function (options) - { - var oDTP = $(this).data(), - sArrDataKeys = oDTP ? Object.keys(oDTP) : [], - iKey, sKey; - - if(typeof options === "string") - { - if($.cf._isValid(oDTP)) - { - if(options === "destroy") - { - if(sArrDataKeys.length > 0) - { - for(iKey in sArrDataKeys) - { - sKey = sArrDataKeys[iKey]; - if(sKey.search("plugin_DateTimePicker") !== -1) - { - $(document).unbind("click.DateTimePicker keydown.DateTimePicker keyup.DateTimePicker"); - - $(this).children().remove(); - $(this).removeData(); - $(this).unbind(); - $(this).removeClass("dtpicker-overlay dtpicker-mobile dtpicker-inline"); - - oDTP = oDTP[sKey]; - - console.log("Destroyed DateTimePicker Object"); - console.log(oDTP); - - break; - } - } - } - else - { - console.log("No DateTimePicker Object Defined For This Element"); - } - } - else if(options === "object") - { - if(sArrDataKeys.length > 0) - { - for(iKey in sArrDataKeys) - { - sKey = sArrDataKeys[iKey]; - if(sKey.search("plugin_DateTimePicker") !== -1) - { - return oDTP[sKey]; - } - } - } - else - { - console.log("No DateTimePicker Object Defined For This Element"); - } - } - } - } - else - { - return this.each(function() - { - $.removeData(this, "plugin_DateTimePicker"); - if(!$.data(this, "plugin_DateTimePicker")) - $.data(this, "plugin_DateTimePicker", new DateTimePicker(this, options)); - }); - } - }; - - DateTimePicker.prototype = { - - // Public Method - init: function () - { - var oDTP = this; - - oDTP._setDateFormatArray(); // Set DateFormatArray - oDTP._setTimeFormatArray(); // Set TimeFormatArray - oDTP._setDateTimeFormatArray(); // Set DateTimeFormatArray - - console.log($(oDTP.element).data('parentelement') + " " + $(oDTP.element).attr('data-parentelement')); - if($(oDTP.element).data('parentelement') !== undefined) - { - oDTP.settings.parentElement = $(oDTP.element).data('parentelement'); - } - - if(oDTP.settings.isPopup && !oDTP.settings.isInline) - { - oDTP._createPicker(); - $(oDTP.element).addClass("dtpicker-mobile"); - } - - if(oDTP.settings.isInline) - { - oDTP._createPicker(); - oDTP._showPicker(oDTP.settings.inputElement); - } - - if(oDTP.settings.init) - oDTP.settings.init.call(oDTP); - - oDTP._addEventHandlersForInput(); - }, - - _setDateFormatArray: function() - { - var oDTP = this; - - oDTP.oData.sArrInputDateFormats = []; - var sDate = ""; - - // 0 - "dd-MM-yyyy" - sDate = "dd" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "yyyy"; - oDTP.oData.sArrInputDateFormats.push(sDate); - - // 1 - "MM-dd-yyyy" - sDate = "MM" + oDTP.settings.dateSeparator + "dd" + oDTP.settings.dateSeparator + "yyyy"; - oDTP.oData.sArrInputDateFormats.push(sDate); - - // 2 - "yyyy-MM-dd" - sDate = "yyyy" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "dd"; - oDTP.oData.sArrInputDateFormats.push(sDate); - - // 3 - "dd-MMM-yyyy" - sDate = "dd" + oDTP.settings.dateSeparator + "MMM" + oDTP.settings.dateSeparator + "yyyy"; - oDTP.oData.sArrInputDateFormats.push(sDate); - - // 4 - "MM yyyy" - sDate = "MM" + oDTP.settings.monthYearSeparator + "yyyy"; - oDTP.oData.sArrInputDateFormats.push(sDate); - - // 5 - "MMM yyyy" - sDate = "MMM" + oDTP.settings.monthYearSeparator + "yyyy"; - oDTP.oData.sArrInputDateFormats.push(sDate); - - // 6 - "MMM yyyy" - sDate = "MMMM" + oDTP.settings.monthYearSeparator + "yyyy"; - oDTP.oData.sArrInputDateFormats.push(sDate); - - // 7 - "yyyy MM" - sDate = "yyyy" + oDTP.settings.monthYearSeparator + "MM"; - oDTP.oData.sArrInputDateFormats.push(sDate); - }, - - _setTimeFormatArray: function() - { - var oDTP = this; - - oDTP.oData.sArrInputTimeFormats = []; - var sTime = ""; - - // 0 - "hh:mm:ss AA" - sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss" + oDTP.settings.timeMeridiemSeparator + "AA"; - oDTP.oData.sArrInputTimeFormats.push(sTime); - - // 1 - "HH:mm:ss" - sTime = "HH" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss"; - oDTP.oData.sArrInputTimeFormats.push(sTime); - - // 2 - "hh:mm AA" - sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeMeridiemSeparator + "AA"; - oDTP.oData.sArrInputTimeFormats.push(sTime); - - // 3 - "HH:mm" - sTime = "HH" + oDTP.settings.timeSeparator + "mm"; - oDTP.oData.sArrInputTimeFormats.push(sTime); - }, - - _setDateTimeFormatArray: function() - { - var oDTP = this; - - oDTP.oData.sArrInputDateTimeFormats = []; - var sDate = "", sTime = "", sDateTime = ""; - - // 0 - "dd-MM-yyyy HH:mm:ss" - sDate = "dd" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "yyyy"; - sTime = "HH" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss"; - sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; - oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); - - // 1 - "dd-MM-yyyy hh:mm:ss AA" - sDate = "dd" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "yyyy"; - sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss" + oDTP.settings.timeMeridiemSeparator + "AA"; - sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; - oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); - - // 2 - "MM-dd-yyyy HH:mm:ss" - sDate = "MM" + oDTP.settings.dateSeparator + "dd" + oDTP.settings.dateSeparator + "yyyy"; - sTime = "HH" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss"; - sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; - oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); - - // 3 - "MM-dd-yyyy hh:mm:ss AA" - sDate = "MM" + oDTP.settings.dateSeparator + "dd" + oDTP.settings.dateSeparator + "yyyy"; - sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss" + oDTP.settings.timeMeridiemSeparator + "AA"; - sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; - oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); - - // 4 - "yyyy-MM-dd HH:mm:ss" - sDate = "yyyy" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "dd"; - sTime = "HH" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss"; - sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; - oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); - - // 5 - "yyyy-MM-dd hh:mm:ss AA" - sDate = "yyyy" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "dd"; - sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss" + oDTP.settings.timeMeridiemSeparator + "AA"; - sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; - oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); - - // 6 - "dd-MMM-yyyy hh:mm:ss" - sDate = "dd" + oDTP.settings.dateSeparator + "MMM" + oDTP.settings.dateSeparator + "yyyy"; - sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss"; - sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; - oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); - - // 7 - "dd-MMM-yyyy hh:mm:ss AA" - sDate = "dd" + oDTP.settings.dateSeparator + "MMM" + oDTP.settings.dateSeparator + "yyyy"; - sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss" + oDTP.settings.timeMeridiemSeparator + "AA"; - sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; - oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); - - //-------------- - - // 8 - "dd-MM-yyyy HH:mm" - sDate = "dd" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "yyyy"; - sTime = "HH" + oDTP.settings.timeSeparator + "mm"; - sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; - oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); - - // 9 - "dd-MM-yyyy hh:mm AA" - sDate = "dd" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "yyyy"; - sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeMeridiemSeparator + "AA"; - sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; - oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); - - // 10 - "MM-dd-yyyy HH:mm" - sDate = "MM" + oDTP.settings.dateSeparator + "dd" + oDTP.settings.dateSeparator + "yyyy"; - sTime = "HH" + oDTP.settings.timeSeparator + "mm"; - sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; - oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); - - // 11 - "MM-dd-yyyy hh:mm AA" - sDate = "MM" + oDTP.settings.dateSeparator + "dd" + oDTP.settings.dateSeparator + "yyyy"; - sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeMeridiemSeparator + "AA"; - sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; - oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); - - // 12 - "yyyy-MM-dd HH:mm" - sDate = "yyyy" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "dd"; - sTime = "HH" + oDTP.settings.timeSeparator + "mm"; - sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; - oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); - - // 13 - "yyyy-MM-dd hh:mm AA" - sDate = "yyyy" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "dd"; - sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeMeridiemSeparator + "AA"; - sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; - oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); - - // 14 - "dd-MMM-yyyy hh:mm" - sDate = "dd" + oDTP.settings.dateSeparator + "MMM" + oDTP.settings.dateSeparator + "yyyy"; - sTime = "hh" + oDTP.settings.timeSeparator + "mm"; - sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; - oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); - - // 15 - "dd-MMM-yyyy hh:mm AA" - sDate = "dd" + oDTP.settings.dateSeparator + "MMM" + oDTP.settings.dateSeparator + "yyyy"; - sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeMeridiemSeparator + "AA"; - sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; - oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); - }, - - _matchFormat: function(sMode, sFormat) - { - var oDTP = this; - - oDTP.oData.bArrMatchFormat = []; - oDTP.oData.bDateMode = false; - oDTP.oData.bTimeMode = false; - oDTP.oData.bDateTimeMode = false; - var oArrInput = [], iTempIndex; - - sMode = $.cf._isValid(sMode) ? sMode : oDTP.settings.mode; - if($.cf._compare(sMode, "date")) - { - sFormat = $.cf._isValid(sFormat) ? sFormat : oDTP.oData.sDateFormat; - oDTP.oData.bDateMode = true; - oArrInput = oDTP.oData.sArrInputDateFormats; - } - else if($.cf._compare(sMode, "time")) - { - sFormat = $.cf._isValid(sFormat) ? sFormat : oDTP.oData.sTimeFormat; - oDTP.oData.bTimeMode = true; - oArrInput = oDTP.oData.sArrInputTimeFormats; - } - else if($.cf._compare(sMode, "datetime")) - { - sFormat = $.cf._isValid(sFormat) ? sFormat : oDTP.oData.sDateTimeFormat; - oDTP.oData.bDateTimeMode = true; - oArrInput = oDTP.oData.sArrInputDateTimeFormats; - } - - for(iTempIndex = 0; iTempIndex < oArrInput.length; iTempIndex++) - { - oDTP.oData.bArrMatchFormat.push( - $.cf._compare(sFormat, oArrInput[iTempIndex]) - ); - } - }, - - _setMatchFormat: function(iArgsLength, sMode, sFormat) - { - var oDTP = this; - - if(iArgsLength > 0) - oDTP._matchFormat(sMode, sFormat); - }, - - _createPicker: function() - { - var oDTP = this; - - if(oDTP.settings.isInline) - { - $(oDTP.element).addClass("dtpicker-inline"); - } - else - { - $(oDTP.element).addClass("dtpicker-overlay"); - $(".dtpicker-overlay").click(function(e) - { - oDTP._hidePicker(""); - }); - } - - var sTempStr = ""; - sTempStr += "
"; - sTempStr += "
"; - sTempStr += "
"; - sTempStr += "
"; - sTempStr += "
"; - sTempStr += "
"; - sTempStr += "
"; - sTempStr += "
"; - $(oDTP.element).html(sTempStr); - }, - - _addEventHandlersForInput: function() - { - var oDTP = this; - - if(!oDTP.settings.isInline) - { - oDTP.oData.oInputElement = null; - - $(oDTP.settings.parentElement).find("input[type='date'], input[type='time'], input[type='datetime']").each(function() - { - $(this).attr("data-field", $(this).attr("type")); - $(this).attr("type", "text"); - }); - - var sel = "[data-field='date'], [data-field='time'], [data-field='datetime']"; - $(oDTP.settings.parentElement).off("focus", sel, oDTP._inputFieldFocus) - .on ("focus", sel, {"obj": oDTP}, oDTP._inputFieldFocus) - - $(oDTP.settings.parentElement).off("click", sel, oDTP._inputFieldClick) - .on ("click", sel, {"obj": oDTP}, oDTP._inputFieldClick); - } - - if(oDTP.settings.addEventHandlers) - oDTP.settings.addEventHandlers.call(oDTP); - }, - - _inputFieldFocus: function(e) - { - var oDTP = e.data.obj; - oDTP.showDateTimePicker(this); - oDTP.oData.bMouseDown = false; - }, - - _inputFieldClick: function(e) - { - var oDTP = e.data.obj; - if(!$.cf._compare($(this).prop("tagName"), "input")) - { - oDTP.showDateTimePicker(this); - } - e.stopPropagation(); - }, - - // Public Method - getDateObjectForInputField: function(oInputField) - { - var oDTP = this; - - if($.cf._isValid(oInputField)) - { - var sDateTime = oDTP._getValueOfElement(oInputField), - sMode = $(oInputField).data("field"), - sFormat = "", - dInput; - - if(!$.cf._isValid(sMode)) - sMode = oDTP.settings.mode; - if(! oDTP.settings.formatDateTimeString) - { - sFormat = $(oInputField).data("format"); - if(!$.cf._isValid(sFormat)) - { - if($.cf._compare(sMode, "date")) - sFormat = oDTP.settings.dateFormat; - else if($.cf._compare(sMode, "time")) - sFormat = oDTP.settings.timeFormat; - else if($.cf._compare(sMode, "datetime")) - sFormat = oDTP.settings.dateTimeFormat; - } - - oDTP._matchFormat(sMode, sFormat); - - if($.cf._compare(sMode, "date")) - dInput = oDTP._parseDate(sDateTime); - else if($.cf._compare(sMode, "time")) - dInput = oDTP._parseTime(sDateTime); - else if($.cf._compare(sMode, "datetime")) - dInput = oDTP._parseDateTime(sDateTime); - - } - else - { - dInput = oDTP.settings.parseDateTimeString.call(oDTP, sDateTime, sMode, sFormat, $(oInputField)); - } - - return dInput; - } - }, - - // Public Method - setDateTimeStringInInputField: function(oInputField, dInput) - { - var oDTP = this; - - dInput = dInput || oDTP.oData.dCurrentDate; - - var oArrElements; - if($.cf._isValid(oInputField)) - { - oArrElements = []; - if(typeof oInputField === "string") - oArrElements.push(oInputField); - else if(typeof oInputField === "object") - oArrElements = oInputField; - } - else - { - if($.cf._isValid(oDTP.settings.parentElement)) - { - oArrElements = $(oDTP.settings.parentElement).find("[data-field='date'], [data-field='time'], [data-field='datetime']"); - } - else - { - oArrElements = $("[data-field='date'], [data-field='time'], [data-field='datetime']"); - } - } - - oArrElements.each(function() - { - var oElement = this, - sMode, sFormat, bIs12Hour, sOutput; - - sMode = $(oElement).data("field"); - if(!$.cf._isValid(sMode)) - sMode = oDTP.settings.mode; - - sFormat = "Custom"; - bIs12Hour = false; - if(! oDTP.settings.formatDateTimeString) - { - sFormat = $(oElement).data("format"); - if(!$.cf._isValid(sFormat)) - { - if($.cf._compare(sMode, "date")) - sFormat = oDTP.settings.dateFormat; - else if($.cf._compare(sMode, "time")) - sFormat = oDTP.settings.timeFormat; - else if($.cf._compare(sMode, "datetime")) - sFormat = oDTP.settings.dateTimeFormat; - } - - bIs12Hour = oDTP.getIs12Hour(sMode, sFormat); - } - - sOutput = oDTP._setOutput(sMode, sFormat, bIs12Hour, dInput, oElement); - oDTP._setValueOfElement(sOutput, $(oElement)); - }); - }, - - // Public Method - getDateTimeStringInFormat: function(sMode, sFormat, dInput) - { - var oDTP = this; - return oDTP._setOutput(sMode, sFormat, oDTP.getIs12Hour(sMode, sFormat), dInput); - }, - - // Public Method - showDateTimePicker: function(oElement) - { - var oDTP = this; - - if(oDTP.oData.oInputElement !== null) - { - if(!oDTP.settings.isInline) - oDTP._hidePicker(0, oElement); - } - else - oDTP._showPicker(oElement); - }, - - _setButtonAction: function(bFromTab) - { - var oDTP = this; - - if(oDTP.oData.oInputElement !== null) - { - oDTP._setValueOfElement(oDTP._setOutput()); - - if(bFromTab) - { - if(oDTP.settings.buttonClicked) - oDTP.settings.buttonClicked.call(oDTP, "TAB", oDTP.oData.oInputElement); - if(!oDTP.settings.isInline) - oDTP._hidePicker(0); - } - else - { - if(!oDTP.settings.isInline) - oDTP._hidePicker(""); - } - } - }, - - _setOutput: function(sMode, sFormat, bIs12Hour, dCurrentDate, oElement) - { - var oDTP = this; - - dCurrentDate = $.cf._isValid(dCurrentDate) ? dCurrentDate : oDTP.oData.dCurrentDate; - bIs12Hour = bIs12Hour || oDTP.oData.bIs12Hour; - - var oDTV = oDTP._setVariablesForDate(dCurrentDate, true, true); - - var sOutput = "", - oFDate = oDTP._formatDate(oDTV), - oFTime = oDTP._formatTime(oDTV), - oFDT = $.extend({}, oFDate, oFTime), - - sDateStr = "", sTimeStr = "", - iArgsLength = Function.length, - bAddSeconds; - - if(oDTP.settings.formatDateTimeString) - { - sOutput = oDTP.settings.formatDateTimeString.call(oDTP, oFDT, sMode, sFormat, oElement); - } - else - { - // Set bDate, bTime, bDateTime & bArrMatchFormat based on arguments of this function - oDTP._setMatchFormat(iArgsLength, sMode, sFormat); - - if(oDTP.oData.bDateMode) - { - if(oDTP.oData.bArrMatchFormat[0]) - { - sOutput = oFDT.dd + oDTP.settings.dateSeparator + oFDT.MM + oDTP.settings.dateSeparator + oFDT.yyyy; - } - else if(oDTP.oData.bArrMatchFormat[1]) - { - sOutput = oFDT.MM + oDTP.settings.dateSeparator + oFDT.dd + oDTP.settings.dateSeparator + oFDT.yyyy; - } - else if(oDTP.oData.bArrMatchFormat[2]) - { - sOutput = oFDT.yyyy + oDTP.settings.dateSeparator + oFDT.MM + oDTP.settings.dateSeparator + oFDT.dd; - } - else if(oDTP.oData.bArrMatchFormat[3]) - { - sOutput = oFDT.dd + oDTP.settings.dateSeparator + oFDT.monthShort + oDTP.settings.dateSeparator + oFDT.yyyy; - } - else if(oDTP.oData.bArrMatchFormat[4]) - { - sOutput = oFDT.MM + oDTP.settings.monthYearSeparator + oFDT.yyyy; - } - else if(oDTP.oData.bArrMatchFormat[5]) - { - sOutput = oFDT.monthShort + oDTP.settings.monthYearSeparator + oFDT.yyyy; - } - else if(oDTP.oData.bArrMatchFormat[6]) - { - sOutput = oFDT.month + oDTP.settings.monthYearSeparator + oFDT.yyyy; - } - else if(oDTP.oData.bArrMatchFormat[7]) - { - sOutput = oFDT.yyyy + oDTP.settings.monthYearSeparator + oFDT.MM; - } - } - else if(oDTP.oData.bTimeMode) - { - if(oDTP.oData.bArrMatchFormat[0]) - { - sOutput = oFDT.hh + oDTP.settings.timeSeparator + oFDT.mm + oDTP.settings.timeSeparator + oFDT.ss + oDTP.settings.timeMeridiemSeparator + oFDT.ME; - } - else if(oDTP.oData.bArrMatchFormat[1]) - { - sOutput = oFDT.HH + oDTP.settings.timeSeparator + oFDT.mm + oDTP.settings.timeSeparator + oFDT.ss; - } - else if(oDTP.oData.bArrMatchFormat[2]) - { - sOutput = oFDT.hh + oDTP.settings.timeSeparator + oFDT.mm + oDTP.settings.timeMeridiemSeparator + oFDT.ME; - } - else if(oDTP.oData.bArrMatchFormat[3]) - { - sOutput = oFDT.HH + oDTP.settings.timeSeparator + oFDT.mm; - } - } - else if(oDTP.oData.bDateTimeMode) - { - // Date Part - "dd-MM-yyyy" - if(oDTP.oData.bArrMatchFormat[0] || - oDTP.oData.bArrMatchFormat[1] || - oDTP.oData.bArrMatchFormat[8] || - oDTP.oData.bArrMatchFormat[9]) - { - sDateStr = oFDT.dd + oDTP.settings.dateSeparator + oFDT.MM + oDTP.settings.dateSeparator + oFDT.yyyy; - } - // Date Part - "MM-dd-yyyy" - else if(oDTP.oData.bArrMatchFormat[2] || - oDTP.oData.bArrMatchFormat[3] || - oDTP.oData.bArrMatchFormat[10] || - oDTP.oData.bArrMatchFormat[11]) - { - sDateStr = oFDT.MM + oDTP.settings.dateSeparator + oFDT.dd + oDTP.settings.dateSeparator + oFDT.yyyy; - } - // Date Part - "yyyy-MM-dd" - else if(oDTP.oData.bArrMatchFormat[4] || - oDTP.oData.bArrMatchFormat[5] || - oDTP.oData.bArrMatchFormat[12] || - oDTP.oData.bArrMatchFormat[13]) - { - sDateStr = oFDT.yyyy + oDTP.settings.dateSeparator + oFDT.MM + oDTP.settings.dateSeparator + oFDT.dd; - } - // Date Part - "dd-MMM-yyyy" - else if(oDTP.oData.bArrMatchFormat[6] || - oDTP.oData.bArrMatchFormat[7] || - oDTP.oData.bArrMatchFormat[14] || - oDTP.oData.bArrMatchFormat[15]) - { - sDateStr = oFDT.dd + oDTP.settings.dateSeparator + oFDT.monthShort + oDTP.settings.dateSeparator + oFDT.yyyy; - } - - bAddSeconds = oDTP.oData.bArrMatchFormat[0] || - oDTP.oData.bArrMatchFormat[1] || - oDTP.oData.bArrMatchFormat[2] || - oDTP.oData.bArrMatchFormat[3] || - oDTP.oData.bArrMatchFormat[4] || - oDTP.oData.bArrMatchFormat[5] || - oDTP.oData.bArrMatchFormat[6] || - oDTP.oData.bArrMatchFormat[7]; - if(bIs12Hour) - { - if(bAddSeconds) - { - sTimeStr = oFDT.hh + oDTP.settings.timeSeparator + oFDT.mm + oDTP.settings.timeSeparator + oFDT.ss + oDTP.settings.timeMeridiemSeparator + oFDT.ME; - } - else - { - sTimeStr = oFDT.hh + oDTP.settings.timeSeparator + oFDT.mm + oDTP.settings.timeMeridiemSeparator + oFDT.ME; - } - } - else - { - if(bAddSeconds) - { - sTimeStr = oFDT.HH + oDTP.settings.timeSeparator + oFDT.mm + oDTP.settings.timeSeparator + oFDT.ss; - } - else - { - sTimeStr = oFDT.HH + oDTP.settings.timeSeparator + oFDT.mm; - } - } - - if(sDateStr !== "" && sTimeStr !== "") - sOutput = sDateStr + oDTP.settings.dateTimeSeparator + sTimeStr; - } - - // Reset bDate, bTime, bDateTime & bArrMatchFormat to original values - oDTP._setMatchFormat(iArgsLength); - } - - return sOutput; - }, - - _clearButtonAction: function() - { - var oDTP = this; - - if(oDTP.oData.oInputElement !== null) - { - oDTP._setValueOfElement(""); - } - if(!oDTP.settings.isInline) - oDTP._hidePicker(""); - }, - - _setOutputOnIncrementOrDecrement: function() - { - var oDTP = this; - - if($.cf._isValid(oDTP.oData.oInputElement) && oDTP.settings.setValueInTextboxOnEveryClick) - { - oDTP._setValueOfElement(oDTP._setOutput()); - } - }, - - _showPicker: function(oElement) - { - var oDTP = this; - - if(oDTP.oData.oInputElement === null) - { - oDTP.oData.oInputElement = oElement; - oDTP.oData.iTabIndex = parseInt($(oElement).attr("tabIndex")); - - var sMode = $(oElement).data("field") || "", - sMinValue = $(oElement).data("min") || "", - sMaxValue = $(oElement).data("max") || "", - sFormat = $(oElement).data("format") || "", - sView = $(oElement).data("view") || "", - sStartEnd = $(oElement).data("startend") || "", - sStartEndElem = $(oElement).data("startendelem") || "", - sCurrent = oDTP._getValueOfElement(oElement) || ""; - - if(sView !== "") - { - if($.cf._compare(sView, "Popup")) - oDTP.setIsPopup(true); - else - oDTP.setIsPopup(false); - } - - if(!oDTP.settings.isPopup && !oDTP.settings.isInline) - { - oDTP._createPicker(); - - var iElemTop = $(oDTP.oData.oInputElement).offset().top + $(oDTP.oData.oInputElement).outerHeight(), - iElemLeft = $(oDTP.oData.oInputElement).offset().left, - iElemWidth = $(oDTP.oData.oInputElement).outerWidth(); - - $(oDTP.element).css({position: "absolute", top: iElemTop, left: iElemLeft, width: iElemWidth, height: "auto"}); - } - - if(oDTP.settings.beforeShow) - oDTP.settings.beforeShow.call(oDTP, oElement); - - sMode = $.cf._isValid(sMode) ? sMode : oDTP.settings.mode; - oDTP.settings.mode = sMode; - if(!$.cf._isValid(sFormat)) - { - if($.cf._compare(sMode, "date")) - sFormat = oDTP.settings.dateFormat; - else if($.cf._compare(sMode, "time")) - sFormat = oDTP.settings.timeFormat; - else if($.cf._compare(sMode, "datetime")) - sFormat = oDTP.settings.dateTimeFormat; - } - - oDTP._matchFormat(sMode, sFormat); - - oDTP.oData.dMinValue = null; - oDTP.oData.dMaxValue = null; - oDTP.oData.bIs12Hour = false; - - var sMin, sMax, - sTempDate, dTempDate, - sTempTime, dTempTime, - sTempDateTime, dTempDateTime; - - if(oDTP.oData.bDateMode) - { - sMin = sMinValue || oDTP.settings.minDate; - sMax = sMaxValue || oDTP.settings.maxDate; - - oDTP.oData.sDateFormat = sFormat; - - if($.cf._isValid(sMin)) - oDTP.oData.dMinValue = oDTP._parseDate(sMin); - if($.cf._isValid(sMax)) - oDTP.oData.dMaxValue = oDTP._parseDate(sMax); - - if(sStartEnd !== "" && ($.cf._compare(sStartEnd, "start") || $.cf._compare(sStartEnd, "end")) && sStartEndElem !== "") - { - if($(sStartEndElem).length >= 1) - { - sTempDate = oDTP._getValueOfElement($(sStartEndElem)); - if(sTempDate !== "") - { - if(oDTP.settings.parseDateTimeString) - dTempDate = oDTP.settings.parseDateTimeString.call(oDTP, sTempDate, sMode, sFormat, $(sStartEndElem)); - else - dTempDate = oDTP._parseDate(sTempDate); - - if($.cf._compare(sStartEnd, "start")) - { - if($.cf._isValid(sMax)) - { - if(oDTP._compareDates(dTempDate, oDTP.oData.dMaxValue) < 0) - oDTP.oData.dMaxValue = new Date(dTempDate); - } - else - oDTP.oData.dMaxValue = new Date(dTempDate); - } - else if($.cf._compare(sStartEnd, "end")) - { - if($.cf._isValid(sMin)) - { - if(oDTP._compareDates(dTempDate, oDTP.oData.dMinValue) > 0) - oDTP.oData.dMinValue = new Date(dTempDate); - } - else - oDTP.oData.dMinValue = new Date(dTempDate); - } - } - } - } - - if(oDTP.settings.parseDateTimeString) - oDTP.oData.dCurrentDate = oDTP.settings.parseDateTimeString.call(oDTP, sCurrent, sMode, sFormat, $(oElement)); - else - oDTP.oData.dCurrentDate = oDTP._parseDate(sCurrent); - - oDTP.oData.dCurrentDate.setHours(0); - oDTP.oData.dCurrentDate.setMinutes(0); - oDTP.oData.dCurrentDate.setSeconds(0); - } - else if(oDTP.oData.bTimeMode) - { - sMin = sMinValue || oDTP.settings.minTime; - sMax = sMaxValue || oDTP.settings.maxTime; - - oDTP.oData.sTimeFormat = sFormat; - oDTP.oData.bIs12Hour = oDTP.getIs12Hour(); - - if($.cf._isValid(sMin)) - { - oDTP.oData.dMinValue = oDTP._parseTime(sMin); - - if(!$.cf._isValid(sMax)) - { - if(oDTP.oData.sTimeFormat === oDTP.oData.sArrInputTimeFormats[0]) - sMax = "11:59:59 PM"; - else if(oDTP.oData.sTimeFormat === oDTP.oData.sArrInputTimeFormats[1]) - sMax = "23:59:59"; - else if(oDTP.oData.sTimeFormat === oDTP.oData.sArrInputTimeFormats[2]) - sMax = "11:59 PM"; - else if(oDTP.oData.sTimeFormat === oDTP.oData.sArrInputTimeFormats[3]) - sMax = "23:59"; - - oDTP.oData.dMaxValue = oDTP._parseTime(sMax); - } - } - if($.cf._isValid(sMax)) - { - oDTP.oData.dMaxValue = oDTP._parseTime(sMax); - - if(!$.cf._isValid(sMin)) - { - if(oDTP.oData.sTimeFormat === oDTP.oData.sArrInputTimeFormats[0]) - sMin = "12:00:00 AM"; - else if(oDTP.oData.sTimeFormat === oDTP.oData.sArrInputTimeFormats[1]) - sMin = "00:00:00"; - else if(oDTP.oData.sTimeFormat === oDTP.oData.sArrInputTimeFormats[2]) - sMin = "12:00 AM"; - else if(oDTP.oData.sTimeFormat === oDTP.oData.sArrInputTimeFormats[3]) - sMin = "00:00"; - - oDTP.oData.dMinValue = oDTP._parseTime(sMin); - } - } - - if(sStartEnd !== "" && ($.cf._compare(sStartEnd, "start") || $.cf._compare(sStartEnd, "end")) && sStartEndElem !== "") - { - if($(sStartEndElem).length >= 1) - { - sTempTime = oDTP._getValueOfElement($(sStartEndElem)); - if(sTempTime !== "") - { - if(oDTP.settings.parseDateTimeString) - dTempDate = oDTP.settings.parseDateTimeString.call(oDTP, sTempTime, sMode, sFormat, $(sStartEndElem)); - else - dTempTime = oDTP._parseTime(sTempTime); - - if($.cf._compare(sStartEnd, "start")) - { - dTempTime.setMinutes(dTempTime.getMinutes() - 1); - if($.cf._isValid(sMax)) - { - if(oDTP._compareTime(dTempTime, oDTP.oData.dMaxValue) === 2) - oDTP.oData.dMaxValue = new Date(dTempTime); - } - else - oDTP.oData.dMaxValue = new Date(dTempTime); - } - else if($.cf._compare(sStartEnd, "end")) - { - dTempTime.setMinutes(dTempTime.getMinutes() + 1); - if($.cf._isValid(sMin)) - { - if(oDTP._compareTime(dTempTime, oDTP.oData.dMinValue) === 3) - oDTP.oData.dMinValue = new Date(dTempTime); - } - else - oDTP.oData.dMinValue = new Date(dTempTime); - } - } - } - } - - if(oDTP.settings.parseDateTimeString) - oDTP.oData.dCurrentDate = oDTP.settings.parseDateTimeString.call(oDTP, sCurrent, sMode, sFormat, $(oElement)); - else - oDTP.oData.dCurrentDate = oDTP._parseTime(sCurrent); - } - else if(oDTP.oData.bDateTimeMode) - { - sMin = sMinValue || oDTP.settings.minDateTime; - sMax = sMaxValue || oDTP.settings.maxDateTime; - - oDTP.oData.sDateTimeFormat = sFormat; - oDTP.oData.bIs12Hour = oDTP.getIs12Hour(); - - if($.cf._isValid(sMin)) - oDTP.oData.dMinValue = oDTP._parseDateTime(sMin); - if($.cf._isValid(sMax)) - oDTP.oData.dMaxValue = oDTP._parseDateTime(sMax); - - if(sStartEnd !== "" && ($.cf._compare(sStartEnd, "start") || $.cf._compare(sStartEnd, "end")) && sStartEndElem !== "") - { - if($(sStartEndElem).length >= 1) - { - sTempDateTime = oDTP._getValueOfElement($(sStartEndElem)); - if(sTempDateTime !== "") - { - if(oDTP.settings.parseDateTimeString) - dTempDateTime = oDTP.settings.parseDateTimeString.call(oDTP, sTempDateTime, sMode, sFormat, $(sStartEndElem)); - else - dTempDateTime = oDTP._parseDateTime(sTempDateTime); - - if($.cf._compare(sStartEnd, "start")) - { - if($.cf._isValid(sMax)) - { - if(oDTP._compareDateTime(dTempDateTime, oDTP.oData.dMaxValue) < 0) - oDTP.oData.dMaxValue = new Date(dTempDateTime); - } - else - oDTP.oData.dMaxValue = new Date(dTempDateTime); - } - else if($.cf._compare(sStartEnd, "end")) - { - if($.cf._isValid(sMin)) - { - if(oDTP._compareDateTime(dTempDateTime, oDTP.oData.dMinValue) > 0) - oDTP.oData.dMinValue = new Date(dTempDateTime); - } - else - oDTP.oData.dMinValue = new Date(dTempDateTime); - } - } - } - } - - if(oDTP.settings.parseDateTimeString) - oDTP.oData.dCurrentDate = oDTP.settings.parseDateTimeString.call(oDTP, sCurrent, sMode, sFormat, $(oElement)); - else - oDTP.oData.dCurrentDate = oDTP._parseDateTime(sCurrent); - } - - oDTP._setVariablesForDate(); - oDTP._modifyPicker(); - $(oDTP.element).fadeIn(oDTP.settings.animationDuration); - - if(oDTP.settings.afterShow) - { - setTimeout(function() - { - oDTP.settings.afterShow.call(oDTP, oElement); - }, oDTP.settings.animationDuration); - } - } - }, - - _hidePicker: function(iDuration, oElementToShow) - { - var oDTP = this; - - var oElement = oDTP.oData.oInputElement; - - if(oDTP.settings.beforeHide) - oDTP.settings.beforeHide.call(oDTP, oElement); - - if(!$.cf._isValid(iDuration)) - iDuration = oDTP.settings.animationDuration; - - if($.cf._isValid(oDTP.oData.oInputElement)) - { - $(oDTP.oData.oInputElement).blur(); - oDTP.oData.oInputElement = null; - } - - $(oDTP.element).fadeOut(iDuration); - if(iDuration === 0) - { - $(oDTP.element).find(".dtpicker-subcontent").html(""); - } - else - { - setTimeout(function() - { - $(oDTP.element).find(".dtpicker-subcontent").html(""); - }, iDuration); - } - - $(document).unbind("click.DateTimePicker keydown.DateTimePicker keyup.DateTimePicker"); - - if(oDTP.settings.afterHide) - { - if(iDuration === 0) - { - oDTP.settings.afterHide.call(oDTP, oElement); - } - else - { - setTimeout(function() - { - oDTP.settings.afterHide.call(oDTP, oElement); - }, iDuration); - } - } - - if($.cf._isValid(oElementToShow)) - oDTP._showPicker(oElementToShow); - }, - - _modifyPicker: function() - { - var oDTP = this; - - var sTitleContent, iNumberOfColumns; - var sArrFields = []; - if(oDTP.oData.bDateMode) - { - sTitleContent = oDTP.settings.titleContentDate; - iNumberOfColumns = 3; - - if(oDTP.oData.bArrMatchFormat[0]) // "dd-MM-yyyy" - { - sArrFields = ["day", "month", "year"]; - } - else if(oDTP.oData.bArrMatchFormat[1]) // "MM-dd-yyyy" - { - sArrFields = ["month", "day", "year"]; - } - else if(oDTP.oData.bArrMatchFormat[2]) // "yyyy-MM-dd" - { - sArrFields = ["year", "month", "day"]; - } - else if(oDTP.oData.bArrMatchFormat[3]) // "dd-MMM-yyyy" - { - sArrFields = ["day", "month", "year"]; - } - else if(oDTP.oData.bArrMatchFormat[4]) // "MM-yyyy" - { - iNumberOfColumns = 2; - sArrFields = ["month", "year"]; - } - else if(oDTP.oData.bArrMatchFormat[5]) // "MMM yyyy" - { - iNumberOfColumns = 2; - sArrFields = ["month", "year"]; - } - else if(oDTP.oData.bArrMatchFormat[6]) // "MMMM yyyy" - { - iNumberOfColumns = 2; - sArrFields = ["month", "year"]; - } - else if(oDTP.oData.bArrMatchFormat[7]) // "yyyy-MM" - { - iNumberOfColumns = 2; - sArrFields = ["year", "month"]; - } - } - else if(oDTP.oData.bTimeMode) - { - sTitleContent = oDTP.settings.titleContentTime; - if(oDTP.oData.bArrMatchFormat[0]) // hh:mm:ss AA - { - iNumberOfColumns = 4; - sArrFields = ["hour", "minutes", "seconds", "meridiem"]; - } - else if(oDTP.oData.bArrMatchFormat[1]) // HH:mm:ss - { - iNumberOfColumns = 3; - sArrFields = ["hour", "minutes", "seconds"]; - } - else if(oDTP.oData.bArrMatchFormat[2]) // hh:mm AA - { - iNumberOfColumns = 3; - sArrFields = ["hour", "minutes", "meridiem"]; - } - else if(oDTP.oData.bArrMatchFormat[3]) // HH:mm - { - iNumberOfColumns = 2; - sArrFields = ["hour", "minutes"]; - } - } - else if(oDTP.oData.bDateTimeMode) - { - sTitleContent = oDTP.settings.titleContentDateTime; - - if(oDTP.oData.bArrMatchFormat[0]) - { - iNumberOfColumns = 6; - sArrFields = ["day", "month", "year", "hour", "minutes", "seconds"]; - } - else if(oDTP.oData.bArrMatchFormat[1]) - { - iNumberOfColumns = 7; - sArrFields = ["day", "month", "year", "hour", "minutes", "seconds", "meridiem"]; - } - else if(oDTP.oData.bArrMatchFormat[2]) - { - iNumberOfColumns = 6; - sArrFields = ["month", "day", "year", "hour", "minutes", "seconds"]; - } - else if(oDTP.oData.bArrMatchFormat[3]) - { - iNumberOfColumns = 7; - sArrFields = ["month", "day", "year", "hour", "minutes", "seconds", "meridiem"]; - } - else if(oDTP.oData.bArrMatchFormat[4]) - { - iNumberOfColumns = 6; - sArrFields = ["year", "month", "day", "hour", "minutes", "seconds"]; - } - else if(oDTP.oData.bArrMatchFormat[5]) - { - iNumberOfColumns = 7; - sArrFields = ["year", "month", "day", "hour", "minutes", "seconds", "meridiem"]; - } - else if(oDTP.oData.bArrMatchFormat[6]) - { - iNumberOfColumns = 6; - sArrFields = ["day", "month", "year", "hour", "minutes", "seconds"]; - } - else if(oDTP.oData.bArrMatchFormat[7]) - { - iNumberOfColumns = 7; - sArrFields = ["day", "month", "year", "hour", "minutes", "seconds", "meridiem"]; - } - else if(oDTP.oData.bArrMatchFormat[8]) - { - iNumberOfColumns = 5; - sArrFields = ["day", "month", "year", "hour", "minutes"]; - } - else if(oDTP.oData.bArrMatchFormat[9]) - { - iNumberOfColumns = 6; - sArrFields = ["day", "month", "year", "hour", "minutes", "meridiem"]; - } - else if(oDTP.oData.bArrMatchFormat[10]) - { - iNumberOfColumns = 5; - sArrFields = ["month", "day", "year", "hour", "minutes"]; - } - else if(oDTP.oData.bArrMatchFormat[11]) - { - iNumberOfColumns = 6; - sArrFields = ["month", "day", "year", "hour", "minutes", "meridiem"]; - } - else if(oDTP.oData.bArrMatchFormat[12]) - { - iNumberOfColumns = 5; - sArrFields = ["year", "month", "day", "hour", "minutes"]; - } - else if(oDTP.oData.bArrMatchFormat[13]) - { - iNumberOfColumns = 6; - sArrFields = ["year", "month", "day", "hour", "minutes", "meridiem"]; - } - else if(oDTP.oData.bArrMatchFormat[14]) - { - iNumberOfColumns = 5; - sArrFields = ["day", "month", "year", "hour", "minutes"]; - } - else if(oDTP.oData.bArrMatchFormat[15]) - { - iNumberOfColumns = 6; - sArrFields = ["day", "month", "year", "hour", "minutes", "meridiem"]; - } - } - - - //-------------------------------------------------------------------- - var sColumnClass = "dtpicker-comp" + iNumberOfColumns, - bDisplayHeaderCloseButton = false, - bDisplaySetButton = false, - bDisplayClearButton = false, - iTempIndex; - - for(iTempIndex = 0; iTempIndex < oDTP.settings.buttonsToDisplay.length; iTempIndex++) - { - if($.cf._compare(oDTP.settings.buttonsToDisplay[iTempIndex], "HeaderCloseButton")) - bDisplayHeaderCloseButton = true; - else if($.cf._compare(oDTP.settings.buttonsToDisplay[iTempIndex], "SetButton")) - bDisplaySetButton = true; - else if($.cf._compare(oDTP.settings.buttonsToDisplay[iTempIndex], "ClearButton")) - bDisplayClearButton = true; - } - - var sHeader = ""; - if(oDTP.settings.showHeader) - { - sHeader += "
"; - sHeader += "
" + sTitleContent + "
"; - if(bDisplayHeaderCloseButton) - sHeader += "×"; - sHeader += "
"; - sHeader += "
"; - } - - //-------------------------------------------------------------------- - - var sDTPickerComp = ""; - sDTPickerComp += "
"; - - for(iTempIndex = 0; iTempIndex < iNumberOfColumns; iTempIndex++) - { - var sFieldName = sArrFields[iTempIndex]; - - sDTPickerComp += "
"; - sDTPickerComp += "
"; - sDTPickerComp += "" + oDTP.settings.incrementButtonContent + ""; - if(oDTP.settings.readonlyInputs) - sDTPickerComp += ""; - else - sDTPickerComp += ""; - sDTPickerComp += "" + oDTP.settings.decrementButtonContent + ""; - if(oDTP.settings.labels) - sDTPickerComp += "
" + oDTP.settings.labels[sFieldName] + "
"; - sDTPickerComp += "
"; - sDTPickerComp += "
"; - } - - sDTPickerComp += "
"; - - //-------------------------------------------------------------------- - - var sButtonContClass = ""; - if(bDisplaySetButton && bDisplayClearButton) - sButtonContClass = " dtpicker-twoButtons"; - else - sButtonContClass = " dtpicker-singleButton"; - - var sDTPickerButtons = ""; - sDTPickerButtons += "
"; - if(bDisplaySetButton) - sDTPickerButtons += "" + oDTP.settings.setButtonContent + ""; - if(bDisplayClearButton) - sDTPickerButtons += "" + oDTP.settings.clearButtonContent + ""; - sDTPickerButtons += "
"; - - //-------------------------------------------------------------------- - - var sTempStr = sHeader + sDTPickerComp + sDTPickerButtons; - - $(oDTP.element).find(".dtpicker-subcontent").html(sTempStr); - - oDTP._setCurrentDate(); - oDTP._addEventHandlersForPicker(); - }, - - _addEventHandlersForPicker: function() - { - var oDTP = this; - var classType, keyCode, $nextElem; - - if(!oDTP.settings.isInline) - { - $(document).on("click.DateTimePicker", function(e) - { - oDTP._hidePicker(""); - }); - } - - $(document).on("keydown.DateTimePicker", function(e) - { - keyCode = parseInt(e.keyCode ? e.keyCode : e.which); - if(! $(".dtpicker-compValue").is(":focus") && keyCode === 9) // TAB - { - oDTP._setButtonAction(true); - $("[tabIndex=" + (oDTP.oData.iTabIndex + 1) + "]").focus(); - return false; - } - else if($(".dtpicker-compValue").is(":focus")) - { - /*if(keyCode === 37) // Left Arrow - { - oDTP._setButtonAction(true); - $nextElem = $(".dtpicker-compValue:focus").parent().prev().children(".dtpicker-compValue"); - $nextElem.focus(); - console.log('Left Arrow '); - console.log($nextElem); - return false; - } - else if(keyCode === 39) // Right Arrow - { - oDTP._setButtonAction(true); - var compVal = $(".dtpicker-compValue:focus"); - $nextElem = $(".dtpicker-compValue:focus").parent(".dtpicker-comp").next().children(".dtpicker-compValue"); - $nextElem.focus(); - console.log('Right Arrow '); - console.log($nextElem); - return false; - } - else*/ - if(keyCode === 38) // Up Arrow - { - classType = $(".dtpicker-compValue:focus").parent().attr("class"); - oDTP._incrementDecrementActionsUsingArrowAndMouse(classType, "inc"); - return false; - } - else if(keyCode === 40) // Down Arrow - { - classType = $(".dtpicker-compValue:focus").parent().attr("class"); - oDTP._incrementDecrementActionsUsingArrowAndMouse(classType, "dec"); - return false; - } - } - }); - - if(!oDTP.settings.isInline) - { - $(document).on("keydown.DateTimePicker", function(e) - { - keyCode = parseInt(e.keyCode ? e.keyCode : e.which); - // console.log("keydown " + keyCode); - if(! $(".dtpicker-compValue").is(":focus") && keyCode !== 9) - { - //if(keyCode !== 37 && keyCode !== 39) - oDTP._hidePicker(""); - } - }); - } - - $(".dtpicker-cont *").click(function(e) - { - e.stopPropagation(); - }); - - if(!oDTP.settings.readonlyInputs) - { - $(".dtpicker-compValue").not(".month .dtpicker-compValue, .meridiem .dtpicker-compValue").keyup(function() - { - this.value = this.value.replace(/[^0-9\.]/g,""); - }); - - $(".dtpicker-compValue").focus(function() - { - oDTP.oData.bElemFocused = true; - $(this).select(); - }); - - $(".dtpicker-compValue").blur(function() - { - oDTP._getValuesFromInputBoxes(); - oDTP._setCurrentDate(); - - oDTP.oData.bElemFocused = false; - var $oParentElem = $(this).parent().parent(); - setTimeout(function() - { - if($oParentElem.is(":last-child") && !oDTP.oData.bElemFocused) - { - oDTP._setButtonAction(false); - } - }, 50); - }); - - $(".dtpicker-compValue").keyup(function(e) - { - var $oTextField = $(this), - - sTextBoxVal = $oTextField.val(), - iLength = sTextBoxVal.length, - sNewTextBoxVal; - - if($oTextField.parent().hasClass("day") || $oTextField.parent().hasClass("hour") || $oTextField.parent().hasClass("minutes") || $oTextField.parent().hasClass("meridiem")) - { - if(iLength > 2) - { - sNewTextBoxVal = sTextBoxVal.slice(0, 2); - $oTextField.val(sNewTextBoxVal); - } - } - else if($oTextField.parent().hasClass("month")) - { - if(iLength > 3) - { - sNewTextBoxVal = sTextBoxVal.slice(0, 3); - $oTextField.val(sNewTextBoxVal); - } - } - else if($oTextField.parent().hasClass("year")) - { - if(iLength > 4) - { - sNewTextBoxVal = sTextBoxVal.slice(0, 4); - $oTextField.val(sNewTextBoxVal); - } - } - - if(parseInt(e.keyCode ? e.keyCode : e.which) === 9) - $(this).select(); - }); - } - - $(oDTP.element).find(".dtpicker-compValue").on("mousewheel DOMMouseScroll onmousewheel", function(e) - { - if($(".dtpicker-compValue").is(":focus")) - { - var delta = Math.max(-1, Math.min(1, e.originalEvent.wheelDelta)); - - if(delta > 0) - { - classType = $(".dtpicker-compValue:focus").parent().attr("class"); - oDTP._incrementDecrementActionsUsingArrowAndMouse(classType, "inc"); - } - else - { - classType = $(".dtpicker-compValue:focus").parent().attr("class"); - oDTP._incrementDecrementActionsUsingArrowAndMouse(classType, "dec"); - } - return false; - } - }); - - //----------------------------------------------------------------------- - - $(oDTP.element).find(".dtpicker-close").click(function(e) - { - if(oDTP.settings.buttonClicked) - oDTP.settings.buttonClicked.call(oDTP, "CLOSE", oDTP.oData.oInputElement); - if(!oDTP.settings.isInline) - oDTP._hidePicker(""); - }); - - $(oDTP.element).find(".dtpicker-buttonSet").click(function(e) - { - if(oDTP.settings.buttonClicked) - oDTP.settings.buttonClicked.call(oDTP, "SET", oDTP.oData.oInputElement); - oDTP._setButtonAction(false); - }); - - $(oDTP.element).find(".dtpicker-buttonClear").click(function(e) - { - if(oDTP.settings.buttonClicked) - oDTP.settings.buttonClicked.call(oDTP, "CLEAR", oDTP.oData.oInputElement); - oDTP._clearButtonAction(); - }); - - // ---------------------------------------------------------------------------- - - //console.log((oDTP.settings.captureTouchHold || oDTP.settings.captureMouseHold)); - if(oDTP.settings.captureTouchHold || oDTP.settings.captureMouseHold) - { - var sHoldEvents = ""; - if(oDTP.settings.captureTouchHold && oDTP.oData.bIsTouchDevice) - sHoldEvents += "touchstart touchmove touchend "; - if(oDTP.settings.captureMouseHold) - sHoldEvents += "mousedown mouseup"; - - $(".dtpicker-cont *").on(sHoldEvents, function(e) - { - oDTP._clearIntervalForTouchEvents(); - }); - - oDTP._bindTouchEvents("day"); - oDTP._bindTouchEvents("month"); - oDTP._bindTouchEvents("year"); - oDTP._bindTouchEvents("hour"); - oDTP._bindTouchEvents("minutes"); - oDTP._bindTouchEvents("seconds"); - } - else - { - $(oDTP.element).find(".day .increment, .day .increment *").click(function(e) - { - oDTP.oData.iCurrentDay++; - oDTP._setCurrentDate(); - oDTP._setOutputOnIncrementOrDecrement(); - }); - - $(oDTP.element).find(".day .decrement, .day .decrement *").click(function(e) - { - oDTP.oData.iCurrentDay--; - oDTP._setCurrentDate(); - oDTP._setOutputOnIncrementOrDecrement(); - }); - - $(oDTP.element).find(".month .increment, .month .increment *").click(function(e) - { - oDTP.oData.iCurrentMonth++; - oDTP._setCurrentDate(); - oDTP._setOutputOnIncrementOrDecrement(); - }); - - $(oDTP.element).find(".month .decrement, .month .decrement *").click(function(e) - { - oDTP.oData.iCurrentMonth--; - oDTP._setCurrentDate(); - oDTP._setOutputOnIncrementOrDecrement(); - }); - - $(oDTP.element).find(".year .increment, .year .increment *").click(function(e) - { - oDTP.oData.iCurrentYear++; - oDTP._setCurrentDate(); - oDTP._setOutputOnIncrementOrDecrement(); - }); - - $(oDTP.element).find(".year .decrement, .year .decrement *").click(function(e) - { - oDTP.oData.iCurrentYear--; - oDTP._setCurrentDate(); - oDTP._setOutputOnIncrementOrDecrement(); - }); - - $(oDTP.element).find(".hour .increment, .hour .increment *").click(function(e) - { - oDTP.oData.iCurrentHour++; - oDTP._setCurrentDate(); - oDTP._setOutputOnIncrementOrDecrement(); - }); - - $(oDTP.element).find(".hour .decrement, .hour .decrement *").click(function(e) - { - oDTP.oData.iCurrentHour--; - oDTP._setCurrentDate(); - oDTP._setOutputOnIncrementOrDecrement(); - }); - - $(oDTP.element).find(".minutes .increment, .minutes .increment *").click(function(e) - { - oDTP.oData.iCurrentMinutes += oDTP.settings.minuteInterval; - oDTP._setCurrentDate(); - oDTP._setOutputOnIncrementOrDecrement(); - }); - - $(oDTP.element).find(".minutes .decrement, .minutes .decrement *").click(function(e) - { - oDTP.oData.iCurrentMinutes -= oDTP.settings.minuteInterval; - oDTP._setCurrentDate(); - oDTP._setOutputOnIncrementOrDecrement(); - }); - - $(oDTP.element).find(".seconds .increment, .seconds .increment *").click(function(e) - { - oDTP.oData.iCurrentSeconds += oDTP.settings.secondsInterval; - oDTP._setCurrentDate(); - oDTP._setOutputOnIncrementOrDecrement(); - }); - - $(oDTP.element).find(".seconds .decrement, .seconds .decrement *").click(function(e) - { - oDTP.oData.iCurrentSeconds -= oDTP.settings.secondsInterval; - oDTP._setCurrentDate(); - oDTP._setOutputOnIncrementOrDecrement(); - }); - } - - $(oDTP.element).find(".meridiem .dtpicker-compButton, .meridiem .dtpicker-compButton *").click(function(e) - { - if($.cf._compare(oDTP.oData.sCurrentMeridiem, "AM")) - { - oDTP.oData.sCurrentMeridiem = "PM"; - oDTP.oData.iCurrentHour += 12; - } - else if($.cf._compare(oDTP.oData.sCurrentMeridiem, "PM")) - { - oDTP.oData.sCurrentMeridiem = "AM"; - oDTP.oData.iCurrentHour -= 12; - } - oDTP._setCurrentDate(); - oDTP._setOutputOnIncrementOrDecrement(); - }); - }, - - _adjustMinutes: function(iMinutes) - { - var oDTP = this; - if(oDTP.settings.roundOffMinutes && oDTP.settings.minuteInterval !== 1) - { - iMinutes = (iMinutes % oDTP.settings.minuteInterval) ? (iMinutes - (iMinutes % oDTP.settings.minuteInterval) + oDTP.settings.minuteInterval) : iMinutes; - } - return iMinutes; - }, - - _adjustSeconds: function(iSeconds) - { - var oDTP = this; - if(oDTP.settings.roundOffSeconds && oDTP.settings.secondsInterval !== 1) - { - iSeconds = (iSeconds % oDTP.settings.secondsInterval) ? (iSeconds - (iSeconds % oDTP.settings.secondsInterval) + oDTP.settings.secondsInterval) : iSeconds; - } - return iSeconds; - }, - - _getValueOfElement: function(oElem) - { - var oDTP = this; - var sElemValue = ""; - - if($.cf._compare($(oElem).prop("tagName"), "INPUT")) - sElemValue = $(oElem).val(); - else - sElemValue = $(oElem).html(); - - return sElemValue; - }, - - _setValueOfElement: function(sElemValue, $oElem) - { - var oDTP = this; - - if(!$.cf._isValid($oElem)) - $oElem = $(oDTP.oData.oInputElement); - - if($.cf._compare($oElem.prop("tagName"), "INPUT")) - $oElem.val(sElemValue); - else - $oElem.html(sElemValue); - - var dElemValue = oDTP.getDateObjectForInputField($oElem); - - if(oDTP.settings.settingValueOfElement) - oDTP.settings.settingValueOfElement.call(oDTP, sElemValue, dElemValue, $oElem); - - $oElem.change(); - - return sElemValue; - }, - - _bindTouchEvents: function(type) - { - var oDTP = this; - - $(oDTP.element).find("." + type + " .increment, ." + type + " .increment *").on("touchstart mousedown", function(e) - { - e.stopPropagation(); - if(!$.cf._isValid(oDTP.oData.sTouchButton)) - { - oDTP.oData.iTouchStart = (new Date()).getTime(); - oDTP.oData.sTouchButton = type + "-inc"; - - oDTP._setIntervalForTouchEvents(); - } - }); - - $(oDTP.element).find("." + type + " .increment, ." + type + " .increment *").on("touchend mouseup", function(e) - { - e.stopPropagation(); - oDTP._clearIntervalForTouchEvents(); - }); - - $(oDTP.element).find("." + type + " .decrement, ." + type + " .decrement *").on("touchstart mousedown", function(e) - { - e.stopPropagation(); - if(!$.cf._isValid(oDTP.oData.sTouchButton)) - { - oDTP.oData.iTouchStart = (new Date()).getTime(); - oDTP.oData.sTouchButton = type + "-dec"; - - oDTP._setIntervalForTouchEvents(); - } - }); - - $(oDTP.element).find("." + type + " .decrement, ." + type + " .decrement *").on("touchend mouseup", function(e) - { - e.stopPropagation(); - oDTP._clearIntervalForTouchEvents(); - }); - }, - - _setIntervalForTouchEvents: function() - { - var oDTP = this; - - var iInterval = oDTP.oData.bIsTouchDevice ? oDTP.settings.touchHoldInterval : oDTP.settings.mouseHoldInterval; - if(!$.cf._isValid(oDTP.oData.oTimeInterval)) - { - var iDiff; - - oDTP.oData.oTimeInterval = setInterval(function() - { - iDiff = ((new Date()).getTime() - oDTP.oData.iTouchStart); - if(iDiff > iInterval && $.cf._isValid(oDTP.oData.sTouchButton)) - { - if(oDTP.oData.sTouchButton === "day-inc") - { - oDTP.oData.iCurrentDay++; - } - else if(oDTP.oData.sTouchButton === "day-dec") - { - oDTP.oData.iCurrentDay--; - } - else if(oDTP.oData.sTouchButton === "month-inc") - { - oDTP.oData.iCurrentMonth++; - } - else if(oDTP.oData.sTouchButton === "month-dec") - { - oDTP.oData.iCurrentMonth--; - } - else if(oDTP.oData.sTouchButton === "year-inc") - { - oDTP.oData.iCurrentYear++; - } - else if(oDTP.oData.sTouchButton === "year-dec") - { - oDTP.oData.iCurrentYear--; - } - else if(oDTP.oData.sTouchButton === "hour-inc") - { - oDTP.oData.iCurrentHour++; - } - else if(oDTP.oData.sTouchButton === "hour-dec") - { - oDTP.oData.iCurrentHour--; - } - else if(oDTP.oData.sTouchButton === "minute-inc") - { - oDTP.oData.iCurrentMinutes += oDTP.settings.minuteInterval; - } - else if(oDTP.oData.sTouchButton === "minute-dec") - { - oDTP.oData.iCurrentMinutes -= oDTP.settings.minuteInterval; - } - else if(oDTP.oData.sTouchButton === "second-inc") - { - oDTP.oData.iCurrentSeconds += oDTP.settings.secondsInterval; - } - else if(oDTP.oData.sTouchButton === "second-dec") - { - oDTP.oData.iCurrentSeconds -= oDTP.settings.secondsInterval; - } - - oDTP._setCurrentDate(); - oDTP._setOutputOnIncrementOrDecrement(); - - oDTP.oData.iTouchStart = (new Date()).getTime(); - } - }, iInterval); - } - }, - - _clearIntervalForTouchEvents: function() - { - var oDTP = this; - - clearInterval(oDTP.oData.oTimeInterval); - if($.cf._isValid(oDTP.oData.sTouchButton)) - { - oDTP.oData.sTouchButton = null; - oDTP.oData.iTouchStart = 0; - } - oDTP.oData.oTimeInterval = null; - }, - - _incrementDecrementActionsUsingArrowAndMouse: function(type, action) - { - var oDTP = this; - - if(type.includes("day")) - { - if (action === "inc") oDTP.oData.iCurrentDay++; - else if (action === "dec") oDTP.oData.iCurrentDay--; - } - else if(type.includes("month")) - { - if (action === "inc") oDTP.oData.iCurrentMonth++; - else if (action === "dec") oDTP.oData.iCurrentMonth--; - } - else if(type.includes("year")) - { - if (action === "inc") oDTP.oData.iCurrentYear++; - else if (action === "dec") oDTP.oData.iCurrentYear--; - } - else if(type.includes("hour")) - { - if (action === "inc") oDTP.oData.iCurrentHour++; - else if (action === "dec") oDTP.oData.iCurrentHour--; - } - else if(type.includes("minutes")) - { - if (action === "inc") oDTP.oData.iCurrentMinutes += oDTP.settings.minuteInterval; - else if (action === "dec") oDTP.oData.iCurrentMinutes -= oDTP.settings.minuteInterval; - } - else if(type.includes("seconds")) - { - if (action === "inc") oDTP.oData.iCurrentSeconds += oDTP.settings.secondsInterval; - else if (action === "dec") oDTP.oData.iCurrentSeconds -= oDTP.settings.secondsInterval; - } - - oDTP._setCurrentDate(); - oDTP._setOutputOnIncrementOrDecrement(); - }, - - //----------------------------------------------------------------- - - _parseDate: function(sDate) - { - var oDTP = this; - - var dTempDate = (oDTP.settings.defaultDate ? new Date(oDTP.settings.defaultDate) : new Date()), - iDate = dTempDate.getDate(), - iMonth = dTempDate.getMonth(), - iYear = dTempDate.getFullYear(); - - if($.cf._isValid(sDate)) - { - if(typeof sDate === "string") - { - var sArrDate; - if(oDTP.oData.bArrMatchFormat[4] || oDTP.oData.bArrMatchFormat[5] || oDTP.oData.bArrMatchFormat[6]) - sArrDate = sDate.split(oDTP.settings.monthYearSeparator); - else - sArrDate = sDate.split(oDTP.settings.dateSeparator); - - if(oDTP.oData.bArrMatchFormat[0]) // "dd-MM-yyyy" - { - iDate = parseInt(sArrDate[0]); - iMonth = parseInt(sArrDate[1] - 1); - iYear = parseInt(sArrDate[2]); - } - else if(oDTP.oData.bArrMatchFormat[1]) // "MM-dd-yyyy" - { - iMonth = parseInt(sArrDate[0] - 1); - iDate = parseInt(sArrDate[1]); - iYear = parseInt(sArrDate[2]); - } - else if(oDTP.oData.bArrMatchFormat[2]) // "yyyy-MM-dd" - { - iYear = parseInt(sArrDate[0]); - iMonth = parseInt(sArrDate[1] - 1); - iDate = parseInt(sArrDate[2]); - } - else if(oDTP.oData.bArrMatchFormat[3]) // "dd-MMM-yyyy" - { - iDate = parseInt(sArrDate[0]); - iMonth = oDTP._getShortMonthIndex(sArrDate[1]); - iYear = parseInt(sArrDate[2]); - } - else if(oDTP.oData.bArrMatchFormat[4]) // "MM-yyyy" - { - iDate = 1; - iMonth = parseInt(sArrDate[0]) - 1; - iYear = parseInt(sArrDate[1]); - } - else if(oDTP.oData.bArrMatchFormat[5]) // "MMM yyyy" - { - iDate = 1; - iMonth = oDTP._getShortMonthIndex(sArrDate[0]); - iYear = parseInt(sArrDate[1]); - } - else if(oDTP.oData.bArrMatchFormat[6]) // "MMMM yyyy" - { - iDate = 1; - iMonth = oDTP._getFullMonthIndex(sArrDate[0]); - iYear = parseInt(sArrDate[1]); - } - else if(oDTP.oData.bArrMatchFormat[7]) // "yyyy MM" - { - iDate = 1; - iMonth = parseInt(sArrDate[1]) - 1; - iYear = parseInt(sArrDate[0]); - } - } - else - { - iDate = sDate.getDate(); - iMonth = sDate.getMonth(); - iYear = sDate.getFullYear(); - } - } - - dTempDate = new Date(iYear, iMonth, iDate, 0, 0, 0, 0); - return dTempDate; - }, - - _parseTime: function(sTime) - { - var oDTP = this; - - var dTempDate = (oDTP.settings.defaultDate ? new Date(oDTP.settings.defaultDate) : new Date()), - iDate = dTempDate.getDate(), - iMonth = dTempDate.getMonth(), - iYear = dTempDate.getFullYear(), - iHour = dTempDate.getHours(), - iMinutes = dTempDate.getMinutes(), - iSeconds = dTempDate.getSeconds(), - sArrTime, sMeridiem, sArrTimeComp, - bShowSeconds = oDTP.oData.bArrMatchFormat[0] || - oDTP.oData.bArrMatchFormat[1]; - - iSeconds = bShowSeconds ? oDTP._adjustSeconds(iSeconds) : 0; - - if($.cf._isValid(sTime)) - { - if(typeof sTime === "string") - { - if(oDTP.oData.bIs12Hour) - { - sArrTime = sTime.split(oDTP.settings.timeMeridiemSeparator); - sTime = sArrTime[0]; - sMeridiem = sArrTime[1]; - - if(!($.cf._compare(sMeridiem, "AM") || $.cf._compare(sMeridiem, "PM"))) - sMeridiem = ""; - } - - sArrTimeComp = sTime.split(oDTP.settings.timeSeparator); - iHour = parseInt(sArrTimeComp[0]); - iMinutes = parseInt(sArrTimeComp[1]); - - if(bShowSeconds) - { - iSeconds = parseInt(sArrTimeComp[2]); - iSeconds = oDTP._adjustSeconds(iSeconds); - } - - if(iHour === 12 && $.cf._compare(sMeridiem, "AM")) - iHour = 0; - else if(iHour < 12 && $.cf._compare(sMeridiem, "PM")) - iHour += 12; - } - else - { - iHour = sTime.getHours(); - iMinutes = sTime.getMinutes(); - - if(bShowSeconds) - { - iSeconds = sTime.getSeconds(); - iSeconds = oDTP._adjustSeconds(iSeconds); - } - } - } - iMinutes = oDTP._adjustMinutes(iMinutes); - - dTempDate = new Date(iYear, iMonth, iDate, iHour, iMinutes, iSeconds, 0); - - return dTempDate; - }, - - _parseDateTime: function(sDateTime) - { - var oDTP = this; - - var dTempDate = (oDTP.settings.defaultDate ? new Date(oDTP.settings.defaultDate) : new Date()), - iDate = dTempDate.getDate(), - iMonth = dTempDate.getMonth(), - iYear = dTempDate.getFullYear(), - iHour = dTempDate.getHours(), - iMinutes = dTempDate.getMinutes(), - iSeconds = dTempDate.getSeconds(), - sMeridiem = "", - sArrDateTime, sArrDate, sTime, sArrTimeComp, sArrTime, - bShowSeconds = oDTP.oData.bArrMatchFormat[0] || // "dd-MM-yyyy HH:mm:ss" - oDTP.oData.bArrMatchFormat[1] || // ""dd-MM-yyyy hh:mm:ss AA" - oDTP.oData.bArrMatchFormat[2] || // "MM-dd-yyyy HH:mm:ss" - oDTP.oData.bArrMatchFormat[3] || // "MM-dd-yyyy hh:mm:ss AA" - oDTP.oData.bArrMatchFormat[4] || // "yyyy-MM-dd HH:mm:ss" - oDTP.oData.bArrMatchFormat[5] || // "yyyy-MM-dd hh:mm:ss AA" - oDTP.oData.bArrMatchFormat[6] || // "dd-MMM-yyyy HH:mm:ss" - oDTP.oData.bArrMatchFormat[7]; // "dd-MMM-yyyy hh:mm:ss AA" - - iSeconds = bShowSeconds ? oDTP._adjustSeconds(iSeconds) : 0; - - if($.cf._isValid(sDateTime)) - { - if(typeof sDateTime === "string") - { - sArrDateTime = sDateTime.split(oDTP.settings.dateTimeSeparator); - sArrDate = sArrDateTime[0].split(oDTP.settings.dateSeparator); - - if(oDTP.oData.bArrMatchFormat[0] || // "dd-MM-yyyy HH:mm:ss" - oDTP.oData.bArrMatchFormat[1] || // ""dd-MM-yyyy hh:mm:ss AA" - oDTP.oData.bArrMatchFormat[8] || // "dd-MM-yyyy HH:mm" - oDTP.oData.bArrMatchFormat[9]) // "dd-MM-yyyy hh:mm AA" - { - iDate = parseInt(sArrDate[0]); - iMonth = parseInt(sArrDate[1] - 1); - iYear = parseInt(sArrDate[2]); - } - else if(oDTP.oData.bArrMatchFormat[2] || // "MM-dd-yyyy HH:mm:ss" - oDTP.oData.bArrMatchFormat[3] || // "MM-dd-yyyy hh:mm:ss AA" - oDTP.oData.bArrMatchFormat[10] || // "MM-dd-yyyy HH:mm" - oDTP.oData.bArrMatchFormat[11]) // "MM-dd-yyyy hh:mm AA" - { - iMonth = parseInt(sArrDate[0] - 1); - iDate = parseInt(sArrDate[1]); - iYear = parseInt(sArrDate[2]); - } - else if(oDTP.oData.bArrMatchFormat[4] || // "yyyy-MM-dd HH:mm:ss" - oDTP.oData.bArrMatchFormat[5] || // "yyyy-MM-dd hh:mm:ss AA" - oDTP.oData.bArrMatchFormat[12] || // "yyyy-MM-dd HH:mm" - oDTP.oData.bArrMatchFormat[13]) // "yyyy-MM-dd hh:mm AA" - { - iYear = parseInt(sArrDate[0]); - iMonth = parseInt(sArrDate[1] - 1); - iDate = parseInt(sArrDate[2]); - } - else if(oDTP.oData.bArrMatchFormat[6] || // "dd-MMM-yyyy HH:mm:ss" - oDTP.oData.bArrMatchFormat[7] || // "dd-MMM-yyyy hh:mm:ss AA" - oDTP.oData.bArrMatchFormat[14] || // "dd-MMM-yyyy HH:mm:ss" - oDTP.oData.bArrMatchFormat[15]) // "dd-MMM-yyyy hh:mm:ss AA" - { - iDate = parseInt(sArrDate[0]); - iMonth = oDTP._getShortMonthIndex(sArrDate[1]); - iYear = parseInt(sArrDate[2]); - } - - sTime = sArrDateTime[1]; - if($.cf._isValid(sTime)) - { - if(oDTP.oData.bIs12Hour) - { - if($.cf._compare(oDTP.settings.dateTimeSeparator, oDTP.settings.timeMeridiemSeparator) && (sArrDateTime.length === 3)) - sMeridiem = sArrDateTime[2]; - else - { - sArrTimeComp = sTime.split(oDTP.settings.timeMeridiemSeparator); - sTime = sArrTimeComp[0]; - sMeridiem = sArrTimeComp[1]; - } - - if(!($.cf._compare(sMeridiem, "AM") || $.cf._compare(sMeridiem, "PM"))) - sMeridiem = ""; - } - - sArrTime = sTime.split(oDTP.settings.timeSeparator); - - iHour = parseInt(sArrTime[0]); - iMinutes = parseInt(sArrTime[1]); - if(bShowSeconds) - { - iSeconds = parseInt(sArrTime[2]); - } - - if(iHour === 12 && $.cf._compare(sMeridiem, "AM")) - iHour = 0; - else if(iHour < 12 && $.cf._compare(sMeridiem, "PM")) - iHour += 12; - } - } - else - { - iDate = sDateTime.getDate(); - iMonth = sDateTime.getMonth(); - iYear = sDateTime.getFullYear(); - - iHour = sDateTime.getHours(); - iMinutes = sDateTime.getMinutes(); - - if(bShowSeconds) - { - iSeconds = sDateTime.getSeconds(); - iSeconds = oDTP._adjustSeconds(iSeconds); - } - } - } - iMinutes = oDTP._adjustMinutes(iMinutes); - - dTempDate = new Date(iYear, iMonth, iDate, iHour, iMinutes, iSeconds, 0); - return dTempDate; - }, - - _getShortMonthIndex: function(sMonthName) - { - var oDTP = this; - - for(var iTempIndex = 0; iTempIndex < oDTP.settings.shortMonthNames.length; iTempIndex++) - { - if($.cf._compare(sMonthName, oDTP.settings.shortMonthNames[iTempIndex])) - return iTempIndex; - } - }, - - _getFullMonthIndex: function(sMonthName) - { - var oDTP = this; - - for(var iTempIndex = 0; iTempIndex < oDTP.settings.fullMonthNames.length; iTempIndex++) - { - if($.cf._compare(sMonthName, oDTP.settings.fullMonthNames[iTempIndex])) - return iTempIndex; - } - }, - - // Public Method - getIs12Hour: function(sMode, sFormat) - { - var oDTP = this; - - var bIs12Hour = false, - iArgsLength = Function.length; - - oDTP._setMatchFormat(iArgsLength, sMode, sFormat); - - if(oDTP.oData.bTimeMode) - { - bIs12Hour = oDTP.oData.bArrMatchFormat[0] || - oDTP.oData.bArrMatchFormat[2]; - } - else if(oDTP.oData.bDateTimeMode) - { - bIs12Hour = oDTP.oData.bArrMatchFormat[1] || - oDTP.oData.bArrMatchFormat[3] || - oDTP.oData.bArrMatchFormat[5] || - oDTP.oData.bArrMatchFormat[7] || - oDTP.oData.bArrMatchFormat[9] || - oDTP.oData.bArrMatchFormat[11] || - oDTP.oData.bArrMatchFormat[13] || - oDTP.oData.bArrMatchFormat[15]; - } - - oDTP._setMatchFormat(iArgsLength); - - return bIs12Hour; - }, - - //----------------------------------------------------------------- - - _setVariablesForDate: function(dInput, bIncludeTime, bSetMeridiem) - { - var oDTP = this; - - var dTemp, oDTV = {}, - bValidInput = $.cf._isValid(dInput); - if(bValidInput) - { - dTemp = new Date(dInput); - if(!$.cf._isValid(bIncludeTime)) - bIncludeTime = true; - if(!$.cf._isValid(bSetMeridiem)) - bSetMeridiem = true; - } - else - { - if (Object.prototype.toString.call(oDTP.oData.dCurrentDate) === "[object Date]" && isFinite(oDTP.oData.dCurrentDate)) - dTemp = new Date(oDTP.oData.dCurrentDate); - else - dTemp = new Date(); - - if(!$.cf._isValid(bIncludeTime)) - bIncludeTime = (oDTP.oData.bTimeMode || oDTP.oData.bDateTimeMode); - if(!$.cf._isValid(bSetMeridiem)) - bSetMeridiem = oDTP.oData.bIs12Hour; - } - - oDTV.iCurrentDay = dTemp.getDate(); - oDTV.iCurrentMonth = dTemp.getMonth(); - oDTV.iCurrentYear = dTemp.getFullYear(); - oDTV.iCurrentWeekday = dTemp.getDay(); - - if(bIncludeTime) - { - oDTV.iCurrentHour = dTemp.getHours(); - oDTV.iCurrentMinutes = dTemp.getMinutes(); - oDTV.iCurrentSeconds = dTemp.getSeconds(); - - if(bSetMeridiem) - { - oDTV.sCurrentMeridiem = oDTP._determineMeridiemFromHourAndMinutes(oDTV.iCurrentHour, oDTV.iCurrentMinutes); - } - } - - if(bValidInput) - return oDTV; - else - oDTP.oData = $.extend(oDTP.oData, oDTV); - }, - - _getValuesFromInputBoxes: function() - { - var oDTP = this; - - if(oDTP.oData.bDateMode || oDTP.oData.bDateTimeMode) - { - var sMonth, iMonth; - - sMonth = $(oDTP.element).find(".month .dtpicker-compValue").val(); - if(sMonth.length > 1) - sMonth = sMonth.charAt(0).toUpperCase() + sMonth.slice(1); - iMonth = oDTP.settings.shortMonthNames.indexOf(sMonth); - if(iMonth !== -1) - { - oDTP.oData.iCurrentMonth = parseInt(iMonth); - } - else - { - if(sMonth.match("^[+|-]?[0-9]+$")) - { - oDTP.oData.iCurrentMonth = parseInt(sMonth - 1); - } - } - - oDTP.oData.iCurrentDay = parseInt($(oDTP.element).find(".day .dtpicker-compValue").val()) || oDTP.oData.iCurrentDay; - oDTP.oData.iCurrentYear = parseInt($(oDTP.element).find(".year .dtpicker-compValue").val()) || oDTP.oData.iCurrentYear; - } - - if(oDTP.oData.bTimeMode || oDTP.oData.bDateTimeMode) - { - var iTempHour, iTempMinutes, iTempSeconds, sMeridiem; - - iTempHour = parseInt($(oDTP.element).find(".hour .dtpicker-compValue").val()); - iTempMinutes = oDTP._adjustMinutes(parseInt($(oDTP.element).find(".minutes .dtpicker-compValue").val())); - iTempSeconds = oDTP._adjustMinutes(parseInt($(oDTP.element).find(".seconds .dtpicker-compValue").val())); - - oDTP.oData.iCurrentHour = isNaN(iTempHour) ? oDTP.oData.iCurrentHour : iTempHour; - oDTP.oData.iCurrentMinutes = isNaN(iTempMinutes) ? oDTP.oData.iCurrentMinutes : iTempMinutes; - oDTP.oData.iCurrentSeconds = isNaN(iTempSeconds) ? oDTP.oData.iCurrentSeconds : iTempSeconds; - - if(oDTP.oData.iCurrentSeconds > 59) - { - oDTP.oData.iCurrentMinutes += oDTP.oData.iCurrentSeconds / 60; - oDTP.oData.iCurrentSeconds = oDTP.oData.iCurrentSeconds % 60; - } - if(oDTP.oData.iCurrentMinutes > 59) - { - oDTP.oData.iCurrentHour += oDTP.oData.iCurrentMinutes / 60; - oDTP.oData.iCurrentMinutes = oDTP.oData.iCurrentMinutes % 60; - } - - if(oDTP.oData.bIs12Hour) - { - if(oDTP.oData.iCurrentHour > 12) - oDTP.oData.iCurrentHour = (oDTP.oData.iCurrentHour % 12); - } - else - { - if(oDTP.oData.iCurrentHour > 23) - oDTP.oData.iCurrentHour = (oDTP.oData.iCurrentHour % 23); - } - - if(oDTP.oData.bIs12Hour) - { - sMeridiem = $(oDTP.element).find(".meridiem .dtpicker-compValue").val(); - if($.cf._compare(sMeridiem, "AM") || $.cf._compare(sMeridiem, "PM")) - oDTP.oData.sCurrentMeridiem = sMeridiem; - - if($.cf._compare(oDTP.oData.sCurrentMeridiem, "PM")) - { - if(oDTP.oData.iCurrentHour !== 12 && oDTP.oData.iCurrentHour < 13) - oDTP.oData.iCurrentHour += 12; - } - if($.cf._compare(oDTP.oData.sCurrentMeridiem, "AM") && oDTP.oData.iCurrentHour === 12) - oDTP.oData.iCurrentHour = 0; - } - } - }, - - _setCurrentDate: function() - { - var oDTP = this; - - if(oDTP.oData.bTimeMode || oDTP.oData.bDateTimeMode) - { - if(oDTP.oData.iCurrentSeconds > 59) - { - oDTP.oData.iCurrentMinutes += oDTP.oData.iCurrentSeconds / 60; - oDTP.oData.iCurrentSeconds = oDTP.oData.iCurrentSeconds % 60; - } - else if(oDTP.oData.iCurrentSeconds < 0) - { - oDTP.oData.iCurrentMinutes -= oDTP.settings.minuteInterval; - oDTP.oData.iCurrentSeconds += 60; - } - oDTP.oData.iCurrentMinutes = oDTP._adjustMinutes(oDTP.oData.iCurrentMinutes); - oDTP.oData.iCurrentSeconds = oDTP._adjustSeconds(oDTP.oData.iCurrentSeconds); - } - - var dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, oDTP.oData.iCurrentHour, oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0), - bGTMaxDate = false, bLTMinDate = false, - sFormat, oDate, oFormattedDate, oFormattedTime, - sDate, sTime, sDateTime; - - if(oDTP.oData.dMaxValue !== null) - bGTMaxDate = (dTempDate.getTime() > oDTP.oData.dMaxValue.getTime()); - if(oDTP.oData.dMinValue !== null) - bLTMinDate = (dTempDate.getTime() < oDTP.oData.dMinValue.getTime()); - - if(bGTMaxDate || bLTMinDate) - { - var bCDGTMaxDate = false, bCDLTMinDate = false; - if(oDTP.oData.dMaxValue !== null) - bCDGTMaxDate = (oDTP.oData.dCurrentDate.getTime() > oDTP.oData.dMaxValue.getTime()); - if(oDTP.oData.dMinValue !== null) - bCDLTMinDate = (oDTP.oData.dCurrentDate.getTime() < oDTP.oData.dMinValue.getTime()); - - if(!(bCDGTMaxDate || bCDLTMinDate)) - dTempDate = new Date(oDTP.oData.dCurrentDate); - else - { - if(bCDGTMaxDate) - { - dTempDate = new Date(oDTP.oData.dMaxValue); - console.log("Info : Date/Time/DateTime you entered is later than Maximum value, so DateTimePicker is showing Maximum value in Input Field."); - } - if(bCDLTMinDate) - { - dTempDate = new Date(oDTP.oData.dMinValue); - console.log("Info : Date/Time/DateTime you entered is earlier than Minimum value, so DateTimePicker is showing Minimum value in Input Field."); - } - console.log("Please enter proper Date/Time/DateTime values."); - } - } - - oDTP.oData.dCurrentDate = new Date(dTempDate); - oDTP._setVariablesForDate(); - - oDate = {}; sDate = ""; sTime = ""; sDateTime = ""; - - if(oDTP.oData.bDateMode || oDTP.oData.bDateTimeMode) - { - if(oDTP.oData.bDateMode && (oDTP.oData.bArrMatchFormat[4] || oDTP.oData.bArrMatchFormat[5] || oDTP.oData.bArrMatchFormat[6])) - oDTP.oData.iCurrentDay = 1; - - oFormattedDate = oDTP._formatDate(); - - $(oDTP.element).find(".day .dtpicker-compValue").val(oFormattedDate.dd); - - if(oDTP.oData.bDateMode) - { - if(oDTP.oData.bArrMatchFormat[4] || oDTP.oData.bArrMatchFormat[7]) // "MM-yyyy" - $(oDTP.element).find(".month .dtpicker-compValue").val(oFormattedDate.MM); - else if(oDTP.oData.bArrMatchFormat[6]) // "MMMM yyyy" - $(oDTP.element).find(".month .dtpicker-compValue").val(oFormattedDate.month); - else - $(oDTP.element).find(".month .dtpicker-compValue").val(oFormattedDate.monthShort); - } - else - $(oDTP.element).find(".month .dtpicker-compValue").val(oFormattedDate.monthShort); - - $(oDTP.element).find(".year .dtpicker-compValue").val(oFormattedDate.yyyy); - - if(oDTP.settings.formatHumanDate) - { - oDate = $.extend(oDate, oFormattedDate); - } - else - { - if(oDTP.oData.bDateMode && (oDTP.oData.bArrMatchFormat[4] || oDTP.oData.bArrMatchFormat[5] || oDTP.oData.bArrMatchFormat[6] || oDTP.oData.bArrMatchFormat[7])) - { - if(oDTP.oData.bArrMatchFormat[4]) - sDate = oFormattedDate.MM + oDTP.settings.monthYearSeparator + oFormattedDate.yyyy; - else if(oDTP.oData.bArrMatchFormat[5]) - sDate = oFormattedDate.monthShort + oDTP.settings.monthYearSeparator + oFormattedDate.yyyy; - else if(oDTP.oData.bArrMatchFormat[6]) - sDate = oFormattedDate.month + oDTP.settings.monthYearSeparator + oFormattedDate.yyyy; - else if(oDTP.oData.bArrMatchFormat[7]) - sDate = oFormattedDate.yyyy + oDTP.settings.monthYearSeparator + oFormattedDate.MM; - } - else - sDate = oFormattedDate.dayShort + ", " + oFormattedDate.month + " " + oFormattedDate.dd + ", " + oFormattedDate.yyyy; - } - } - if(oDTP.oData.bTimeMode || oDTP.oData.bDateTimeMode) - { - oFormattedTime = oDTP._formatTime(); - - if(oDTP.oData.bIs12Hour) - $(oDTP.element).find(".meridiem .dtpicker-compValue").val(oDTP.oData.sCurrentMeridiem); - $(oDTP.element).find(".hour .dtpicker-compValue").val(oFormattedTime.hour); - $(oDTP.element).find(".minutes .dtpicker-compValue").val(oFormattedTime.mm); - $(oDTP.element).find(".seconds .dtpicker-compValue").val(oFormattedTime.ss); - - if(oDTP.settings.formatHumanDate) - { - oDate = $.extend(oDate, oFormattedTime); - } - else - { - var bShowSecondsTime = (oDTP.oData.bTimeMode && ( - oDTP.oData.bArrMatchFormat[0] || - oDTP.oData.bArrMatchFormat[1])), - - bShowSecondsDateTime = (oDTP.oData.bDateTimeMode && - (oDTP.oData.bArrMatchFormat[0] || - oDTP.oData.bArrMatchFormat[1] || - oDTP.oData.bArrMatchFormat[2] || - oDTP.oData.bArrMatchFormat[3] || - oDTP.oData.bArrMatchFormat[4] || - oDTP.oData.bArrMatchFormat[5] || - oDTP.oData.bArrMatchFormat[6] || - oDTP.oData.bArrMatchFormat[7])); - - if(bShowSecondsTime || bShowSecondsDateTime) - sTime = oFormattedTime.hour + oDTP.settings.timeSeparator + oFormattedTime.mm + oDTP.settings.timeSeparator + oFormattedTime.ss; - else - sTime = oFormattedTime.hour + oDTP.settings.timeSeparator + oFormattedTime.mm; - - if(oDTP.oData.bIs12Hour) - sTime += oDTP.settings.timeMeridiemSeparator + oDTP.oData.sCurrentMeridiem; - } - } - - if(oDTP.settings.formatHumanDate) - { - if(oDTP.oData.bDateTimeMode) - sFormat = oDTP.oData.sDateFormat; - else if(oDTP.oData.bDateMode) - sFormat = oDTP.oData.sTimeFormat; - else if(oDTP.oData.bTimeMode) - sFormat = oDTP.oData.sDateTimeFormat; - - sDateTime = oDTP.settings.formatHumanDate.call(oDTP, oDate, oDTP.settings.mode, sFormat); - } - else - { - if(oDTP.oData.bDateTimeMode) - sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; - else if(oDTP.oData.bDateMode) - sDateTime = sDate; - else if(oDTP.oData.bTimeMode) - sDateTime = sTime; - } - - $(oDTP.element).find(".dtpicker-value").html(sDateTime); - - oDTP._setButtons(); - }, - - _formatDate: function(oDTVP) - { - var oDTP = this; - var oDTV = {}, - sDay, sYear, - iMonth, sMonth, sMonthShort, sMonthFull, - iDayOfTheWeek, sDayOfTheWeek, sDayOfTheWeekFull; - - if($.cf._isValid(oDTVP)) - oDTV = $.extend({}, oDTVP); - else - { - oDTV.iCurrentDay = oDTP.oData.iCurrentDay; - oDTV.iCurrentMonth = oDTP.oData.iCurrentMonth; - oDTV.iCurrentYear = oDTP.oData.iCurrentYear; - oDTV.iCurrentWeekday = oDTP.oData.iCurrentWeekday; - } - - sDay = oDTV.iCurrentDay; - sDay = (sDay < 10) ? ("0" + sDay) : sDay; - iMonth = oDTV.iCurrentMonth; - sMonth = oDTV.iCurrentMonth + 1; - sMonth = (sMonth < 10) ? ("0" + sMonth) : sMonth; - sMonthShort = oDTP.settings.shortMonthNames[iMonth]; - sMonthFull = oDTP.settings.fullMonthNames[iMonth]; - sYear = oDTV.iCurrentYear; - iDayOfTheWeek = oDTV.iCurrentWeekday; - sDayOfTheWeek = oDTP.settings.shortDayNames[iDayOfTheWeek]; - sDayOfTheWeekFull = oDTP.settings.fullDayNames[iDayOfTheWeek]; - - return { - "dd": sDay, - "MM": sMonth, - "monthShort": sMonthShort, - "month": sMonthFull, - "yyyy": sYear, - "dayShort": sDayOfTheWeek, - "day": sDayOfTheWeekFull - }; - }, - - _formatTime: function(oDTVP) - { - var oDTP = this; - var oDTV = {}, - iHour24, sHour24, iHour12, sHour12, sHour, - sMinutes, sSeconds; - - if($.cf._isValid(oDTVP)) - oDTV = $.extend({}, oDTVP); - else - { - oDTV.iCurrentHour = oDTP.oData.iCurrentHour; - oDTV.iCurrentMinutes = oDTP.oData.iCurrentMinutes; - oDTV.iCurrentSeconds = oDTP.oData.iCurrentSeconds; - oDTV.sCurrentMeridiem = oDTP.oData.sCurrentMeridiem; - } - - iHour24 = oDTV.iCurrentHour; - sHour24 = (iHour24 < 10) ? ("0" + iHour24) : iHour24; - sHour = sHour24; - - iHour12 = oDTV.iCurrentHour; - if(iHour12 > 12) - iHour12 -= 12; - if(sHour === "00") - iHour12 = 12; - sHour12 = (iHour12 < 10) ? ("0" + iHour12) : iHour12; - if(oDTP.oData.bIs12Hour) - sHour = sHour12; - - sMinutes = oDTV.iCurrentMinutes; - sMinutes = (sMinutes < 10) ? ("0" + sMinutes) : sMinutes; - sSeconds = oDTV.iCurrentSeconds; - sSeconds = (sSeconds < 10) ? ("0" + sSeconds) : sSeconds; - - return { - "H": iHour24, - "HH": sHour24, - "h": iHour12, - "hh": sHour12, - "hour": sHour, - "m": oDTV.iCurrentMinutes, - "mm": sMinutes, - "s": oDTV.iCurrentSeconds, - "ss": sSeconds, - "ME": oDTV.sCurrentMeridiem - }; - }, - - _setButtons: function() - { - var oDTP = this; - $(oDTP.element).find(".dtpicker-compButton").removeClass("dtpicker-compButtonDisable").addClass("dtpicker-compButtonEnable"); - - var dTempDate; - if(oDTP.oData.dMaxValue !== null) - { - if(oDTP.oData.bTimeMode) - { - // Decrement Hour - if((oDTP.oData.iCurrentHour + 1) > oDTP.oData.dMaxValue.getHours() || ((oDTP.oData.iCurrentHour + 1) === oDTP.oData.dMaxValue.getHours() && oDTP.oData.iCurrentMinutes > oDTP.oData.dMaxValue.getMinutes())) - $(oDTP.element).find(".hour .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - - // Decrement Minutes - if(oDTP.oData.iCurrentHour >= oDTP.oData.dMaxValue.getHours() && (oDTP.oData.iCurrentMinutes + 1) > oDTP.oData.dMaxValue.getMinutes()) - $(oDTP.element).find(".minutes .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - } - else - { - // Increment Day - dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, (oDTP.oData.iCurrentDay + 1), oDTP.oData.iCurrentHour, oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0); - if(dTempDate.getTime() > oDTP.oData.dMaxValue.getTime()) - $(oDTP.element).find(".day .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - - // Increment Month - dTempDate = new Date(oDTP.oData.iCurrentYear, (oDTP.oData.iCurrentMonth + 1), oDTP.oData.iCurrentDay, oDTP.oData.iCurrentHour, oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0); - if(dTempDate.getTime() > oDTP.oData.dMaxValue.getTime()) - $(oDTP.element).find(".month .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - - // Increment Year - dTempDate = new Date((oDTP.oData.iCurrentYear + 1), oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, oDTP.oData.iCurrentHour, oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0); - if(dTempDate.getTime() > oDTP.oData.dMaxValue.getTime()) - $(oDTP.element).find(".year .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - - // Increment Hour - dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, (oDTP.oData.iCurrentHour + 1), oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0); - if(dTempDate.getTime() > oDTP.oData.dMaxValue.getTime()) - $(oDTP.element).find(".hour .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - - // Increment Minutes - dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, oDTP.oData.iCurrentHour, (oDTP.oData.iCurrentMinutes + 1), oDTP.oData.iCurrentSeconds, 0); - if(dTempDate.getTime() > oDTP.oData.dMaxValue.getTime()) - $(oDTP.element).find(".minutes .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - - // Increment Seconds - dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, oDTP.oData.iCurrentHour, oDTP.oData.iCurrentMinutes, (oDTP.oData.iCurrentSeconds + 1), 0); - if(dTempDate.getTime() > oDTP.oData.dMaxValue.getTime()) - $(oDTP.element).find(".seconds .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - } - } - - if(oDTP.oData.dMinValue !== null) - { - if(oDTP.oData.bTimeMode) - { - // Decrement Hour - if((oDTP.oData.iCurrentHour - 1) < oDTP.oData.dMinValue.getHours() || ((oDTP.oData.iCurrentHour - 1) === oDTP.oData.dMinValue.getHours() && oDTP.oData.iCurrentMinutes < oDTP.oData.dMinValue.getMinutes())) - $(oDTP.element).find(".hour .decrement").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - - // Decrement Minutes - if(oDTP.oData.iCurrentHour <= oDTP.oData.dMinValue.getHours() && (oDTP.oData.iCurrentMinutes - 1) < oDTP.oData.dMinValue.getMinutes()) - $(oDTP.element).find(".minutes .decrement").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - } - else - { - // Decrement Day - dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, (oDTP.oData.iCurrentDay - 1), oDTP.oData.iCurrentHour, oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0); - if(dTempDate.getTime() < oDTP.oData.dMinValue.getTime()) - $(oDTP.element).find(".day .decrement").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - - // Decrement Month - dTempDate = new Date(oDTP.oData.iCurrentYear, (oDTP.oData.iCurrentMonth - 1), oDTP.oData.iCurrentDay, oDTP.oData.iCurrentHour, oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0); - if(dTempDate.getTime() < oDTP.oData.dMinValue.getTime()) - $(oDTP.element).find(".month .decrement").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - - // Decrement Year - dTempDate = new Date((oDTP.oData.iCurrentYear - 1), oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, oDTP.oData.iCurrentHour, oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0); - if(dTempDate.getTime() < oDTP.oData.dMinValue.getTime()) - $(oDTP.element).find(".year .decrement").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - - // Decrement Hour - dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, (oDTP.oData.iCurrentHour - 1), oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0); - if(dTempDate.getTime() < oDTP.oData.dMinValue.getTime()) - $(oDTP.element).find(".hour .decrement").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - - // Decrement Minutes - dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, oDTP.oData.iCurrentHour, (oDTP.oData.iCurrentMinutes - 1), oDTP.oData.iCurrentSeconds, 0); - if(dTempDate.getTime() < oDTP.oData.dMinValue.getTime()) - $(oDTP.element).find(".minutes .decrement").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - - // Decrement Seconds - dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, oDTP.oData.iCurrentHour, oDTP.oData.iCurrentMinutes, (oDTP.oData.iCurrentSeconds - 1), 0); - if(dTempDate.getTime() < oDTP.oData.dMinValue.getTime()) - $(oDTP.element).find(".seconds .decrement").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - } - } - - if(oDTP.oData.bIs12Hour) - { - var iTempHour, iTempMinutes; - if(oDTP.oData.dMaxValue !== null || oDTP.oData.dMinValue !== null) - { - iTempHour = oDTP.oData.iCurrentHour; - if($.cf._compare(oDTP.oData.sCurrentMeridiem, "AM")) - iTempHour += 12; - else if($.cf._compare(oDTP.oData.sCurrentMeridiem, "PM")) - iTempHour -= 12; - - dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, iTempHour, oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0); - - if(oDTP.oData.dMaxValue !== null) - { - if(oDTP.oData.bTimeMode) - { - iTempMinutes = oDTP.oData.iCurrentMinutes; - if(iTempHour > oDTP.oData.dMaxValue.getHours() || (iTempHour === oDTP.oData.dMaxValue.getHours() && iTempMinutes > oDTP.oData.dMaxValue.getMinutes())) - $(oDTP.element).find(".meridiem .dtpicker-compButton").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - } - else - { - if(dTempDate.getTime() > oDTP.oData.dMaxValue.getTime()) - $(oDTP.element).find(".meridiem .dtpicker-compButton").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - } - } - - if(oDTP.oData.dMinValue !== null) - { - if(oDTP.oData.bTimeMode) - { - iTempMinutes = oDTP.oData.iCurrentMinutes; - if(iTempHour < oDTP.oData.dMinValue.getHours() || (iTempHour === oDTP.oData.dMinValue.getHours() && iTempMinutes < oDTP.oData.dMinValue.getMinutes())) - $(oDTP.element).find(".meridiem .dtpicker-compButton").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - } - else - { - if(dTempDate.getTime() < oDTP.oData.dMinValue.getTime()) - $(oDTP.element).find(".meridiem .dtpicker-compButton").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); - } - } - } - } - }, - - // Public Method - setIsPopup: function(bIsPopup) - { - var oDTP = this; - - if(!oDTP.settings.isInline) - { - oDTP.settings.isPopup = bIsPopup; - - if($(oDTP.element).css("display") !== "none") - oDTP._hidePicker(0); - - if(oDTP.settings.isPopup) - { - $(oDTP.element).addClass("dtpicker-mobile"); - - $(oDTP.element).css({position: "fixed", top: 0, left: 0, width: "100%", height: "100%"}); - } - else - { - $(oDTP.element).removeClass("dtpicker-mobile"); - - if(oDTP.oData.oInputElement !== null) - { - var iElemTop = $(oDTP.oData.oInputElement).offset().top + $(oDTP.oData.oInputElement).outerHeight(), - iElemLeft = $(oDTP.oData.oInputElement).offset().left, - iElemWidth = $(oDTP.oData.oInputElement).outerWidth(); - - $(oDTP.element).css({position: "absolute", top: iElemTop, left: iElemLeft, width: iElemWidth, height: "auto"}); - } - } - } - }, - - _compareDates: function(dDate1, dDate2) - { - dDate1 = new Date(dDate1.getDate(), dDate1.getMonth(), dDate1.getFullYear(), 0, 0, 0, 0); - var iDateDiff = (dDate1.getTime() - dDate2.getTime()) / 864E5; - return (iDateDiff === 0) ? iDateDiff: (iDateDiff/Math.abs(iDateDiff)); - }, - - _compareTime: function(dTime1, dTime2) - { - var iTimeMatch = 0; - if((dTime1.getHours() === dTime2.getHours()) && (dTime1.getMinutes() === dTime2.getMinutes())) - iTimeMatch = 1; // 1 = Exact Match - else - { - if(dTime1.getHours() < dTime2.getHours()) - iTimeMatch = 2; // time1 < time2 - else if(dTime1.getHours() > dTime2.getHours()) - iTimeMatch = 3; // time1 > time2 - else if(dTime1.getHours() === dTime2.getHours()) - { - if(dTime1.getMinutes() < dTime2.getMinutes()) - iTimeMatch = 2; // time1 < time2 - else if(dTime1.getMinutes() > dTime2.getMinutes()) - iTimeMatch = 3; // time1 > time2 - } - } - return iTimeMatch; - }, - - _compareDateTime: function(dDate1, dDate2) - { - var iDateTimeDiff = (dDate1.getTime() - dDate2.getTime()) / 6E4; - return (iDateTimeDiff === 0) ? iDateTimeDiff: (iDateTimeDiff/Math.abs(iDateTimeDiff)); - }, - - _determineMeridiemFromHourAndMinutes: function(iHour, iMinutes) - { - if(iHour > 12 || (iHour === 12 && iMinutes >= 0)) - { - return "PM"; - } - else - { - return "AM"; - } - }, - - // Public Method - setLanguage: function(sLanguage) - { - var oDTP = this; - - oDTP.settings = $.extend({}, $.DateTimePicker.defaults, $.DateTimePicker.i18n[sLanguage], oDTP.options); - oDTP.settings.language = sLanguage; - - oDTP._setDateFormatArray(); // Set DateFormatArray - oDTP._setTimeFormatArray(); // Set TimeFormatArray - oDTP._setDateTimeFormatArray(); // Set DateTimeFormatArray - - return oDTP; - } - - }; - -})); - +/* ----------------------------------------------------------------------------- + + jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile + Version 0.1.38 + Copyright (c)2014-2019 Lajpat Shah + Contributors : https://github.com/nehakadam/DateTimePicker/contributors + Repository : https://github.com/nehakadam/DateTimePicker + Documentation : https://nehakadam.github.io/DateTimePicker + + ----------------------------------------------------------------------------- */ + +/* Support Object.keys in IE8 */ +if(!Object.keys) +{ + Object.keys = function(obj) + { + var keys = []; + + for (var i in obj) + { + if (obj.hasOwnProperty(i)) + { + keys.push(i); + } + } + + return keys; + }; +} + +$.DateTimePicker = $.DateTimePicker || { + + name: "DateTimePicker", + + i18n: {}, // Internationalization Objects + + defaults: //Plugin Defaults + { + mode: "date", + defaultDate: null, + + dateSeparator: "-", + timeSeparator: ":", + timeMeridiemSeparator: " ", + dateTimeSeparator: " ", + monthYearSeparator: " ", + + dateTimeFormat: "dd-MM-yyyy HH:mm", + dateFormat: "dd-MM-yyyy", + timeFormat: "HH:mm", + + maxDate: null, + minDate: null, + + maxTime: null, + minTime: null, + + maxDateTime: null, + minDateTime: null, + + shortDayNames: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + fullDayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + shortMonthNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + fullMonthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + labels: null, /*{"year": "Year", "month": "Month", "day": "Day", "hour": "Hour", "minutes": "Minutes", "seconds": "Seconds", "meridiem": "Meridiem"}*/ + + minuteInterval: 1, + roundOffMinutes: true, + + secondsInterval: 1, + roundOffSeconds: true, + + showHeader: true, + titleContentDate: "Set Date", + titleContentTime: "Set Time", + titleContentDateTime: "Set Date & Time", + + buttonsToDisplay: ["HeaderCloseButton", "SetButton", "ClearButton"], + setButtonContent: "Set", + clearButtonContent: "Clear", + incrementButtonContent: "+", + decrementButtonContent: "-", + setValueInTextboxOnEveryClick: false, + readonlyInputs: false, + + animationDuration: 400, + + touchHoldInterval: 300, // in Milliseconds + captureTouchHold: false, // capture Touch Hold Event + + mouseHoldInterval: 50, // in Milliseconds + captureMouseHold: false, // capture Mouse Hold Event + + isPopup: true, + parentElement: "body", + + isInline: false, + inputElement: null, + + language: "", + + init: null, // init(oDateTimePicker) + addEventHandlers: null, // addEventHandlers(oDateTimePicker) + beforeShow: null, // beforeShow(oInputElement) + afterShow: null, // afterShow(oInputElement) + beforeHide: null, // beforeHide(oInputElement) + afterHide: null, // afterHide(oInputElement) + buttonClicked: null, // buttonClicked(sButtonType, oInputElement) where sButtonType = "SET"|"CLEAR"|"CANCEL"|"TAB" + settingValueOfElement: null, // settingValueOfElement(sValue, dDateTime, oInputElement) + formatHumanDate: null, // formatHumanDate(oDateTime, sMode, sFormat) + + parseDateTimeString: null, // parseDateTimeString(sDateTime, sMode, sFormat, oInputField) + formatDateTimeString: null // formatDateTimeString(oDateTime, sMode, sFormat, oInputField) + }, + + dataObject: // Temporary Variables For Calculation Specific to DateTimePicker Instance + { + + dCurrentDate: new Date(), + iCurrentDay: 0, + iCurrentMonth: 0, + iCurrentYear: 0, + iCurrentHour: 0, + iCurrentMinutes: 0, + iCurrentSeconds: 0, + sCurrentMeridiem: "", + iMaxNumberOfDays: 0, + + sDateFormat: "", + sTimeFormat: "", + sDateTimeFormat: "", + + dMinValue: null, + dMaxValue: null, + + sArrInputDateFormats: [], + sArrInputTimeFormats: [], + sArrInputDateTimeFormats: [], + + bArrMatchFormat: [], + bDateMode: false, + bTimeMode: false, + bDateTimeMode: false, + + oInputElement: null, + + iTabIndex: 0, + bElemFocused: false, + + bIs12Hour: false, + + sTouchButton: null, + iTouchStart: null, + oTimeInterval: null, + bIsTouchDevice: "ontouchstart" in document.documentElement + } + +}; + +$.cf = { + + _isValid: function(sValue) + { + return (sValue !== undefined && sValue !== null && sValue !== ""); + }, + + _compare: function(sString1, sString2) + { + var bString1 = (sString1 !== undefined && sString1 !== null), + bString2 = (sString2 !== undefined && sString2 !== null); + if(bString1 && bString2) + { + if(sString1.toLowerCase() === sString2.toLowerCase()) + return true; + else + return false; + } + else + return false; + } + +}; + +(function (factory) +{ + if(typeof define === "function" && define.amd) + { + // AMD. Register as an anonymous module. + define(["jquery"], factory); + } + else if(typeof exports === "object") + { + // Node/CommonJS + module.exports = factory(require("jquery")); + } + else + { + // Browser globals + factory(jQuery); + } +}(function ($) +{ + "use strict"; + + function DateTimePicker(element, options) + { + this.element = element; + + var sLanguage = ""; + sLanguage = ($.cf._isValid(options) && $.cf._isValid(options.language)) ? options.language : $.DateTimePicker.defaults.language; + this.settings = $.extend({}, $.DateTimePicker.defaults, $.DateTimePicker.i18n[sLanguage], options); + this.options = options; + + this.oData = $.extend({}, $.DateTimePicker.dataObject); + this._defaults = $.DateTimePicker.defaults; + this._name = $.DateTimePicker.name; + + this.init(); + } + + $.fn.DateTimePicker = function (options) + { + var oDTP = $(this).data(), + sArrDataKeys = oDTP ? Object.keys(oDTP) : [], + iKey, sKey; + + if(typeof options === "string") + { + if($.cf._isValid(oDTP)) + { + if(options === "destroy") + { + if(sArrDataKeys.length > 0) + { + for(iKey in sArrDataKeys) + { + sKey = sArrDataKeys[iKey]; + if(sKey.search("plugin_DateTimePicker") !== -1) + { + $(document).unbind("click.DateTimePicker keydown.DateTimePicker keyup.DateTimePicker"); + + $(this).children().remove(); + $(this).removeData(); + $(this).unbind(); + $(this).removeClass("dtpicker-overlay dtpicker-mobile dtpicker-inline"); + + oDTP = oDTP[sKey]; + + console.log("Destroyed DateTimePicker Object"); + console.log(oDTP); + + break; + } + } + } + else + { + console.log("No DateTimePicker Object Defined For This Element"); + } + } + else if(options === "object") + { + if(sArrDataKeys.length > 0) + { + for(iKey in sArrDataKeys) + { + sKey = sArrDataKeys[iKey]; + if(sKey.search("plugin_DateTimePicker") !== -1) + { + return oDTP[sKey]; + } + } + } + else + { + console.log("No DateTimePicker Object Defined For This Element"); + } + } + } + } + else + { + return this.each(function() + { + $.removeData(this, "plugin_DateTimePicker"); + if(!$.data(this, "plugin_DateTimePicker")) + $.data(this, "plugin_DateTimePicker", new DateTimePicker(this, options)); + }); + } + }; + + DateTimePicker.prototype = { + + // Public Method + init: function () + { + var oDTP = this; + + oDTP._setDateFormatArray(); // Set DateFormatArray + oDTP._setTimeFormatArray(); // Set TimeFormatArray + oDTP._setDateTimeFormatArray(); // Set DateTimeFormatArray + + console.log($(oDTP.element).data('parentelement') + " " + $(oDTP.element).attr('data-parentelement')); + if($(oDTP.element).data('parentelement') !== undefined) + { + oDTP.settings.parentElement = $(oDTP.element).data('parentelement'); + } + + if(oDTP.settings.isPopup && !oDTP.settings.isInline) + { + oDTP._createPicker(); + $(oDTP.element).addClass("dtpicker-mobile"); + } + + if(oDTP.settings.isInline) + { + oDTP._createPicker(); + oDTP._showPicker(oDTP.settings.inputElement); + } + + if(oDTP.settings.init) + oDTP.settings.init.call(oDTP); + + oDTP._addEventHandlersForInput(); + }, + + _setDateFormatArray: function() + { + var oDTP = this; + + oDTP.oData.sArrInputDateFormats = []; + var sDate = ""; + + // 0 - "dd-MM-yyyy" + sDate = "dd" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "yyyy"; + oDTP.oData.sArrInputDateFormats.push(sDate); + + // 1 - "MM-dd-yyyy" + sDate = "MM" + oDTP.settings.dateSeparator + "dd" + oDTP.settings.dateSeparator + "yyyy"; + oDTP.oData.sArrInputDateFormats.push(sDate); + + // 2 - "yyyy-MM-dd" + sDate = "yyyy" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "dd"; + oDTP.oData.sArrInputDateFormats.push(sDate); + + // 3 - "dd-MMM-yyyy" + sDate = "dd" + oDTP.settings.dateSeparator + "MMM" + oDTP.settings.dateSeparator + "yyyy"; + oDTP.oData.sArrInputDateFormats.push(sDate); + + // 4 - "MM yyyy" + sDate = "MM" + oDTP.settings.monthYearSeparator + "yyyy"; + oDTP.oData.sArrInputDateFormats.push(sDate); + + // 5 - "MMM yyyy" + sDate = "MMM" + oDTP.settings.monthYearSeparator + "yyyy"; + oDTP.oData.sArrInputDateFormats.push(sDate); + + // 6 - "MMM yyyy" + sDate = "MMMM" + oDTP.settings.monthYearSeparator + "yyyy"; + oDTP.oData.sArrInputDateFormats.push(sDate); + + // 7 - "yyyy MM" + sDate = "yyyy" + oDTP.settings.monthYearSeparator + "MM"; + oDTP.oData.sArrInputDateFormats.push(sDate); + }, + + _setTimeFormatArray: function() + { + var oDTP = this; + + oDTP.oData.sArrInputTimeFormats = []; + var sTime = ""; + + // 0 - "hh:mm:ss AA" + sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss" + oDTP.settings.timeMeridiemSeparator + "AA"; + oDTP.oData.sArrInputTimeFormats.push(sTime); + + // 1 - "HH:mm:ss" + sTime = "HH" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss"; + oDTP.oData.sArrInputTimeFormats.push(sTime); + + // 2 - "hh:mm AA" + sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeMeridiemSeparator + "AA"; + oDTP.oData.sArrInputTimeFormats.push(sTime); + + // 3 - "HH:mm" + sTime = "HH" + oDTP.settings.timeSeparator + "mm"; + oDTP.oData.sArrInputTimeFormats.push(sTime); + }, + + _setDateTimeFormatArray: function() + { + var oDTP = this; + + oDTP.oData.sArrInputDateTimeFormats = []; + var sDate = "", sTime = "", sDateTime = ""; + + // 0 - "dd-MM-yyyy HH:mm:ss" + sDate = "dd" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "yyyy"; + sTime = "HH" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss"; + sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; + oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); + + // 1 - "dd-MM-yyyy hh:mm:ss AA" + sDate = "dd" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "yyyy"; + sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss" + oDTP.settings.timeMeridiemSeparator + "AA"; + sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; + oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); + + // 2 - "MM-dd-yyyy HH:mm:ss" + sDate = "MM" + oDTP.settings.dateSeparator + "dd" + oDTP.settings.dateSeparator + "yyyy"; + sTime = "HH" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss"; + sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; + oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); + + // 3 - "MM-dd-yyyy hh:mm:ss AA" + sDate = "MM" + oDTP.settings.dateSeparator + "dd" + oDTP.settings.dateSeparator + "yyyy"; + sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss" + oDTP.settings.timeMeridiemSeparator + "AA"; + sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; + oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); + + // 4 - "yyyy-MM-dd HH:mm:ss" + sDate = "yyyy" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "dd"; + sTime = "HH" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss"; + sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; + oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); + + // 5 - "yyyy-MM-dd hh:mm:ss AA" + sDate = "yyyy" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "dd"; + sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss" + oDTP.settings.timeMeridiemSeparator + "AA"; + sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; + oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); + + // 6 - "dd-MMM-yyyy hh:mm:ss" + sDate = "dd" + oDTP.settings.dateSeparator + "MMM" + oDTP.settings.dateSeparator + "yyyy"; + sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss"; + sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; + oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); + + // 7 - "dd-MMM-yyyy hh:mm:ss AA" + sDate = "dd" + oDTP.settings.dateSeparator + "MMM" + oDTP.settings.dateSeparator + "yyyy"; + sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeSeparator + "ss" + oDTP.settings.timeMeridiemSeparator + "AA"; + sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; + oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); + + //-------------- + + // 8 - "dd-MM-yyyy HH:mm" + sDate = "dd" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "yyyy"; + sTime = "HH" + oDTP.settings.timeSeparator + "mm"; + sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; + oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); + + // 9 - "dd-MM-yyyy hh:mm AA" + sDate = "dd" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "yyyy"; + sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeMeridiemSeparator + "AA"; + sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; + oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); + + // 10 - "MM-dd-yyyy HH:mm" + sDate = "MM" + oDTP.settings.dateSeparator + "dd" + oDTP.settings.dateSeparator + "yyyy"; + sTime = "HH" + oDTP.settings.timeSeparator + "mm"; + sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; + oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); + + // 11 - "MM-dd-yyyy hh:mm AA" + sDate = "MM" + oDTP.settings.dateSeparator + "dd" + oDTP.settings.dateSeparator + "yyyy"; + sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeMeridiemSeparator + "AA"; + sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; + oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); + + // 12 - "yyyy-MM-dd HH:mm" + sDate = "yyyy" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "dd"; + sTime = "HH" + oDTP.settings.timeSeparator + "mm"; + sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; + oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); + + // 13 - "yyyy-MM-dd hh:mm AA" + sDate = "yyyy" + oDTP.settings.dateSeparator + "MM" + oDTP.settings.dateSeparator + "dd"; + sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeMeridiemSeparator + "AA"; + sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; + oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); + + // 14 - "dd-MMM-yyyy hh:mm" + sDate = "dd" + oDTP.settings.dateSeparator + "MMM" + oDTP.settings.dateSeparator + "yyyy"; + sTime = "hh" + oDTP.settings.timeSeparator + "mm"; + sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; + oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); + + // 15 - "dd-MMM-yyyy hh:mm AA" + sDate = "dd" + oDTP.settings.dateSeparator + "MMM" + oDTP.settings.dateSeparator + "yyyy"; + sTime = "hh" + oDTP.settings.timeSeparator + "mm" + oDTP.settings.timeMeridiemSeparator + "AA"; + sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; + oDTP.oData.sArrInputDateTimeFormats.push(sDateTime); + }, + + _matchFormat: function(sMode, sFormat) + { + var oDTP = this; + + oDTP.oData.bArrMatchFormat = []; + oDTP.oData.bDateMode = false; + oDTP.oData.bTimeMode = false; + oDTP.oData.bDateTimeMode = false; + var oArrInput = [], iTempIndex; + + sMode = $.cf._isValid(sMode) ? sMode : oDTP.settings.mode; + if($.cf._compare(sMode, "date")) + { + sFormat = $.cf._isValid(sFormat) ? sFormat : oDTP.oData.sDateFormat; + oDTP.oData.bDateMode = true; + oArrInput = oDTP.oData.sArrInputDateFormats; + } + else if($.cf._compare(sMode, "time")) + { + sFormat = $.cf._isValid(sFormat) ? sFormat : oDTP.oData.sTimeFormat; + oDTP.oData.bTimeMode = true; + oArrInput = oDTP.oData.sArrInputTimeFormats; + } + else if($.cf._compare(sMode, "datetime")) + { + sFormat = $.cf._isValid(sFormat) ? sFormat : oDTP.oData.sDateTimeFormat; + oDTP.oData.bDateTimeMode = true; + oArrInput = oDTP.oData.sArrInputDateTimeFormats; + } + + for(iTempIndex = 0; iTempIndex < oArrInput.length; iTempIndex++) + { + oDTP.oData.bArrMatchFormat.push( + $.cf._compare(sFormat, oArrInput[iTempIndex]) + ); + } + }, + + _setMatchFormat: function(iArgsLength, sMode, sFormat) + { + var oDTP = this; + + if(iArgsLength > 0) + oDTP._matchFormat(sMode, sFormat); + }, + + _createPicker: function() + { + var oDTP = this; + + if(oDTP.settings.isInline) + { + $(oDTP.element).addClass("dtpicker-inline"); + } + else + { + $(oDTP.element).addClass("dtpicker-overlay"); + $(".dtpicker-overlay").click(function(e) + { + oDTP._hidePicker(""); + }); + } + + var sTempStr = ""; + sTempStr += "
"; + sTempStr += "
"; + sTempStr += "
"; + sTempStr += "
"; + sTempStr += "
"; + sTempStr += "
"; + sTempStr += "
"; + sTempStr += "
"; + $(oDTP.element).html(sTempStr); + }, + + _addEventHandlersForInput: function() + { + var oDTP = this; + + if(!oDTP.settings.isInline) + { + oDTP.oData.oInputElement = null; + + $(oDTP.settings.parentElement).find("input[type='date'], input[type='time'], input[type='datetime']").each(function() + { + $(this).attr("data-field", $(this).attr("type")); + $(this).attr("type", "text"); + }); + + var sel = "[data-field='date'], [data-field='time'], [data-field='datetime']"; + $(oDTP.settings.parentElement).off("focus", sel, oDTP._inputFieldFocus) + .on ("focus", sel, {"obj": oDTP}, oDTP._inputFieldFocus) + + $(oDTP.settings.parentElement).off("click", sel, oDTP._inputFieldClick) + .on ("click", sel, {"obj": oDTP}, oDTP._inputFieldClick); + } + + if(oDTP.settings.addEventHandlers) + oDTP.settings.addEventHandlers.call(oDTP); + }, + + _inputFieldFocus: function(e) + { + var oDTP = e.data.obj; + oDTP.showDateTimePicker(this); + oDTP.oData.bMouseDown = false; + }, + + _inputFieldClick: function(e) + { + var oDTP = e.data.obj; + if(!$.cf._compare($(this).prop("tagName"), "input")) + { + oDTP.showDateTimePicker(this); + } + e.stopPropagation(); + }, + + // Public Method + getDateObjectForInputField: function(oInputField) + { + var oDTP = this; + + if($.cf._isValid(oInputField)) + { + var sDateTime = oDTP._getValueOfElement(oInputField), + sMode = $(oInputField).data("field"), + sFormat = "", + dInput; + + if(!$.cf._isValid(sMode)) + sMode = oDTP.settings.mode; + if(! oDTP.settings.formatDateTimeString) + { + sFormat = $(oInputField).data("format"); + if(!$.cf._isValid(sFormat)) + { + if($.cf._compare(sMode, "date")) + sFormat = oDTP.settings.dateFormat; + else if($.cf._compare(sMode, "time")) + sFormat = oDTP.settings.timeFormat; + else if($.cf._compare(sMode, "datetime")) + sFormat = oDTP.settings.dateTimeFormat; + } + + oDTP._matchFormat(sMode, sFormat); + + if($.cf._compare(sMode, "date")) + dInput = oDTP._parseDate(sDateTime); + else if($.cf._compare(sMode, "time")) + dInput = oDTP._parseTime(sDateTime); + else if($.cf._compare(sMode, "datetime")) + dInput = oDTP._parseDateTime(sDateTime); + + } + else + { + dInput = oDTP.settings.parseDateTimeString.call(oDTP, sDateTime, sMode, sFormat, $(oInputField)); + } + + return dInput; + } + }, + + // Public Method + setDateTimeStringInInputField: function(oInputField, dInput) + { + var oDTP = this; + + dInput = dInput || oDTP.oData.dCurrentDate; + + var oArrElements; + if($.cf._isValid(oInputField)) + { + oArrElements = []; + if(typeof oInputField === "string") + oArrElements.push(oInputField); + else if(typeof oInputField === "object") + oArrElements = oInputField; + } + else + { + if($.cf._isValid(oDTP.settings.parentElement)) + { + oArrElements = $(oDTP.settings.parentElement).find("[data-field='date'], [data-field='time'], [data-field='datetime']"); + } + else + { + oArrElements = $("[data-field='date'], [data-field='time'], [data-field='datetime']"); + } + } + + oArrElements.each(function() + { + var oElement = this, + sMode, sFormat, bIs12Hour, sOutput; + + sMode = $(oElement).data("field"); + if(!$.cf._isValid(sMode)) + sMode = oDTP.settings.mode; + + sFormat = "Custom"; + bIs12Hour = false; + if(! oDTP.settings.formatDateTimeString) + { + sFormat = $(oElement).data("format"); + if(!$.cf._isValid(sFormat)) + { + if($.cf._compare(sMode, "date")) + sFormat = oDTP.settings.dateFormat; + else if($.cf._compare(sMode, "time")) + sFormat = oDTP.settings.timeFormat; + else if($.cf._compare(sMode, "datetime")) + sFormat = oDTP.settings.dateTimeFormat; + } + + bIs12Hour = oDTP.getIs12Hour(sMode, sFormat); + } + + sOutput = oDTP._setOutput(sMode, sFormat, bIs12Hour, dInput, oElement); + oDTP._setValueOfElement(sOutput, $(oElement)); + }); + }, + + // Public Method + getDateTimeStringInFormat: function(sMode, sFormat, dInput) + { + var oDTP = this; + return oDTP._setOutput(sMode, sFormat, oDTP.getIs12Hour(sMode, sFormat), dInput); + }, + + // Public Method + showDateTimePicker: function(oElement) + { + var oDTP = this; + + if(oDTP.oData.oInputElement !== null) + { + if(!oDTP.settings.isInline) + oDTP._hidePicker(0, oElement); + } + else + oDTP._showPicker(oElement); + }, + + _setButtonAction: function(bFromTab) + { + var oDTP = this; + + if(oDTP.oData.oInputElement !== null) + { + oDTP._setValueOfElement(oDTP._setOutput()); + + if(bFromTab) + { + if(oDTP.settings.buttonClicked) + oDTP.settings.buttonClicked.call(oDTP, "TAB", oDTP.oData.oInputElement); + if(!oDTP.settings.isInline) + oDTP._hidePicker(0); + } + else + { + if(!oDTP.settings.isInline) + oDTP._hidePicker(""); + } + } + }, + + _setOutput: function(sMode, sFormat, bIs12Hour, dCurrentDate, oElement) + { + var oDTP = this; + + dCurrentDate = $.cf._isValid(dCurrentDate) ? dCurrentDate : oDTP.oData.dCurrentDate; + bIs12Hour = bIs12Hour || oDTP.oData.bIs12Hour; + + var oDTV = oDTP._setVariablesForDate(dCurrentDate, true, true); + + var sOutput = "", + oFDate = oDTP._formatDate(oDTV), + oFTime = oDTP._formatTime(oDTV), + oFDT = $.extend({}, oFDate, oFTime), + + sDateStr = "", sTimeStr = "", + iArgsLength = Function.length, + bAddSeconds; + + if(oDTP.settings.formatDateTimeString) + { + sOutput = oDTP.settings.formatDateTimeString.call(oDTP, oFDT, sMode, sFormat, oElement); + } + else + { + // Set bDate, bTime, bDateTime & bArrMatchFormat based on arguments of this function + oDTP._setMatchFormat(iArgsLength, sMode, sFormat); + + if(oDTP.oData.bDateMode) + { + if(oDTP.oData.bArrMatchFormat[0]) + { + sOutput = oFDT.dd + oDTP.settings.dateSeparator + oFDT.MM + oDTP.settings.dateSeparator + oFDT.yyyy; + } + else if(oDTP.oData.bArrMatchFormat[1]) + { + sOutput = oFDT.MM + oDTP.settings.dateSeparator + oFDT.dd + oDTP.settings.dateSeparator + oFDT.yyyy; + } + else if(oDTP.oData.bArrMatchFormat[2]) + { + sOutput = oFDT.yyyy + oDTP.settings.dateSeparator + oFDT.MM + oDTP.settings.dateSeparator + oFDT.dd; + } + else if(oDTP.oData.bArrMatchFormat[3]) + { + sOutput = oFDT.dd + oDTP.settings.dateSeparator + oFDT.monthShort + oDTP.settings.dateSeparator + oFDT.yyyy; + } + else if(oDTP.oData.bArrMatchFormat[4]) + { + sOutput = oFDT.MM + oDTP.settings.monthYearSeparator + oFDT.yyyy; + } + else if(oDTP.oData.bArrMatchFormat[5]) + { + sOutput = oFDT.monthShort + oDTP.settings.monthYearSeparator + oFDT.yyyy; + } + else if(oDTP.oData.bArrMatchFormat[6]) + { + sOutput = oFDT.month + oDTP.settings.monthYearSeparator + oFDT.yyyy; + } + else if(oDTP.oData.bArrMatchFormat[7]) + { + sOutput = oFDT.yyyy + oDTP.settings.monthYearSeparator + oFDT.MM; + } + } + else if(oDTP.oData.bTimeMode) + { + if(oDTP.oData.bArrMatchFormat[0]) + { + sOutput = oFDT.hh + oDTP.settings.timeSeparator + oFDT.mm + oDTP.settings.timeSeparator + oFDT.ss + oDTP.settings.timeMeridiemSeparator + oFDT.ME; + } + else if(oDTP.oData.bArrMatchFormat[1]) + { + sOutput = oFDT.HH + oDTP.settings.timeSeparator + oFDT.mm + oDTP.settings.timeSeparator + oFDT.ss; + } + else if(oDTP.oData.bArrMatchFormat[2]) + { + sOutput = oFDT.hh + oDTP.settings.timeSeparator + oFDT.mm + oDTP.settings.timeMeridiemSeparator + oFDT.ME; + } + else if(oDTP.oData.bArrMatchFormat[3]) + { + sOutput = oFDT.HH + oDTP.settings.timeSeparator + oFDT.mm; + } + } + else if(oDTP.oData.bDateTimeMode) + { + // Date Part - "dd-MM-yyyy" + if(oDTP.oData.bArrMatchFormat[0] || + oDTP.oData.bArrMatchFormat[1] || + oDTP.oData.bArrMatchFormat[8] || + oDTP.oData.bArrMatchFormat[9]) + { + sDateStr = oFDT.dd + oDTP.settings.dateSeparator + oFDT.MM + oDTP.settings.dateSeparator + oFDT.yyyy; + } + // Date Part - "MM-dd-yyyy" + else if(oDTP.oData.bArrMatchFormat[2] || + oDTP.oData.bArrMatchFormat[3] || + oDTP.oData.bArrMatchFormat[10] || + oDTP.oData.bArrMatchFormat[11]) + { + sDateStr = oFDT.MM + oDTP.settings.dateSeparator + oFDT.dd + oDTP.settings.dateSeparator + oFDT.yyyy; + } + // Date Part - "yyyy-MM-dd" + else if(oDTP.oData.bArrMatchFormat[4] || + oDTP.oData.bArrMatchFormat[5] || + oDTP.oData.bArrMatchFormat[12] || + oDTP.oData.bArrMatchFormat[13]) + { + sDateStr = oFDT.yyyy + oDTP.settings.dateSeparator + oFDT.MM + oDTP.settings.dateSeparator + oFDT.dd; + } + // Date Part - "dd-MMM-yyyy" + else if(oDTP.oData.bArrMatchFormat[6] || + oDTP.oData.bArrMatchFormat[7] || + oDTP.oData.bArrMatchFormat[14] || + oDTP.oData.bArrMatchFormat[15]) + { + sDateStr = oFDT.dd + oDTP.settings.dateSeparator + oFDT.monthShort + oDTP.settings.dateSeparator + oFDT.yyyy; + } + + bAddSeconds = oDTP.oData.bArrMatchFormat[0] || + oDTP.oData.bArrMatchFormat[1] || + oDTP.oData.bArrMatchFormat[2] || + oDTP.oData.bArrMatchFormat[3] || + oDTP.oData.bArrMatchFormat[4] || + oDTP.oData.bArrMatchFormat[5] || + oDTP.oData.bArrMatchFormat[6] || + oDTP.oData.bArrMatchFormat[7]; + if(bIs12Hour) + { + if(bAddSeconds) + { + sTimeStr = oFDT.hh + oDTP.settings.timeSeparator + oFDT.mm + oDTP.settings.timeSeparator + oFDT.ss + oDTP.settings.timeMeridiemSeparator + oFDT.ME; + } + else + { + sTimeStr = oFDT.hh + oDTP.settings.timeSeparator + oFDT.mm + oDTP.settings.timeMeridiemSeparator + oFDT.ME; + } + } + else + { + if(bAddSeconds) + { + sTimeStr = oFDT.HH + oDTP.settings.timeSeparator + oFDT.mm + oDTP.settings.timeSeparator + oFDT.ss; + } + else + { + sTimeStr = oFDT.HH + oDTP.settings.timeSeparator + oFDT.mm; + } + } + + if(sDateStr !== "" && sTimeStr !== "") + sOutput = sDateStr + oDTP.settings.dateTimeSeparator + sTimeStr; + } + + // Reset bDate, bTime, bDateTime & bArrMatchFormat to original values + oDTP._setMatchFormat(iArgsLength); + } + + return sOutput; + }, + + _clearButtonAction: function() + { + var oDTP = this; + + if(oDTP.oData.oInputElement !== null) + { + oDTP._setValueOfElement(""); + } + if(!oDTP.settings.isInline) + oDTP._hidePicker(""); + }, + + _setOutputOnIncrementOrDecrement: function() + { + var oDTP = this; + + if($.cf._isValid(oDTP.oData.oInputElement) && oDTP.settings.setValueInTextboxOnEveryClick) + { + oDTP._setValueOfElement(oDTP._setOutput()); + } + }, + + _showPicker: function(oElement) + { + var oDTP = this; + + if(oDTP.oData.oInputElement === null) + { + oDTP.oData.oInputElement = oElement; + oDTP.oData.iTabIndex = parseInt($(oElement).attr("tabIndex")); + + var sMode = $(oElement).data("field") || "", + sMinValue = $(oElement).data("min") || "", + sMaxValue = $(oElement).data("max") || "", + sFormat = $(oElement).data("format") || "", + sView = $(oElement).data("view") || "", + sStartEnd = $(oElement).data("startend") || "", + sStartEndElem = $(oElement).data("startendelem") || "", + sCurrent = oDTP._getValueOfElement(oElement) || ""; + + if(sView !== "") + { + if($.cf._compare(sView, "Popup")) + oDTP.setIsPopup(true); + else + oDTP.setIsPopup(false); + } + + if(!oDTP.settings.isPopup && !oDTP.settings.isInline) + { + oDTP._createPicker(); + + var iElemTop = $(oDTP.oData.oInputElement).offset().top + $(oDTP.oData.oInputElement).outerHeight(), + iElemLeft = $(oDTP.oData.oInputElement).offset().left, + iElemWidth = $(oDTP.oData.oInputElement).outerWidth(); + + $(oDTP.element).css({position: "absolute", top: iElemTop, left: iElemLeft, width: iElemWidth, height: "auto"}); + } + + if(oDTP.settings.beforeShow) + oDTP.settings.beforeShow.call(oDTP, oElement); + + sMode = $.cf._isValid(sMode) ? sMode : oDTP.settings.mode; + oDTP.settings.mode = sMode; + if(!$.cf._isValid(sFormat)) + { + if($.cf._compare(sMode, "date")) + sFormat = oDTP.settings.dateFormat; + else if($.cf._compare(sMode, "time")) + sFormat = oDTP.settings.timeFormat; + else if($.cf._compare(sMode, "datetime")) + sFormat = oDTP.settings.dateTimeFormat; + } + + oDTP._matchFormat(sMode, sFormat); + + oDTP.oData.dMinValue = null; + oDTP.oData.dMaxValue = null; + oDTP.oData.bIs12Hour = false; + + var sMin, sMax, + sTempDate, dTempDate, + sTempTime, dTempTime, + sTempDateTime, dTempDateTime; + + if(oDTP.oData.bDateMode) + { + sMin = sMinValue || oDTP.settings.minDate; + sMax = sMaxValue || oDTP.settings.maxDate; + + oDTP.oData.sDateFormat = sFormat; + + if($.cf._isValid(sMin)) + oDTP.oData.dMinValue = oDTP._parseDate(sMin); + if($.cf._isValid(sMax)) + oDTP.oData.dMaxValue = oDTP._parseDate(sMax); + + if(sStartEnd !== "" && ($.cf._compare(sStartEnd, "start") || $.cf._compare(sStartEnd, "end")) && sStartEndElem !== "") + { + if($(sStartEndElem).length >= 1) + { + sTempDate = oDTP._getValueOfElement($(sStartEndElem)); + if(sTempDate !== "") + { + if(oDTP.settings.parseDateTimeString) + dTempDate = oDTP.settings.parseDateTimeString.call(oDTP, sTempDate, sMode, sFormat, $(sStartEndElem)); + else + dTempDate = oDTP._parseDate(sTempDate); + + if($.cf._compare(sStartEnd, "start")) + { + if($.cf._isValid(sMax)) + { + if(oDTP._compareDates(dTempDate, oDTP.oData.dMaxValue) < 0) + oDTP.oData.dMaxValue = new Date(dTempDate); + } + else + oDTP.oData.dMaxValue = new Date(dTempDate); + } + else if($.cf._compare(sStartEnd, "end")) + { + if($.cf._isValid(sMin)) + { + if(oDTP._compareDates(dTempDate, oDTP.oData.dMinValue) > 0) + oDTP.oData.dMinValue = new Date(dTempDate); + } + else + oDTP.oData.dMinValue = new Date(dTempDate); + } + } + } + } + + if(oDTP.settings.parseDateTimeString) + oDTP.oData.dCurrentDate = oDTP.settings.parseDateTimeString.call(oDTP, sCurrent, sMode, sFormat, $(oElement)); + else + oDTP.oData.dCurrentDate = oDTP._parseDate(sCurrent); + + oDTP.oData.dCurrentDate.setHours(0); + oDTP.oData.dCurrentDate.setMinutes(0); + oDTP.oData.dCurrentDate.setSeconds(0); + } + else if(oDTP.oData.bTimeMode) + { + sMin = sMinValue || oDTP.settings.minTime; + sMax = sMaxValue || oDTP.settings.maxTime; + + oDTP.oData.sTimeFormat = sFormat; + oDTP.oData.bIs12Hour = oDTP.getIs12Hour(); + + if($.cf._isValid(sMin)) + { + oDTP.oData.dMinValue = oDTP._parseTime(sMin); + + if(!$.cf._isValid(sMax)) + { + if(oDTP.oData.sTimeFormat === oDTP.oData.sArrInputTimeFormats[0]) + sMax = "11:59:59 PM"; + else if(oDTP.oData.sTimeFormat === oDTP.oData.sArrInputTimeFormats[1]) + sMax = "23:59:59"; + else if(oDTP.oData.sTimeFormat === oDTP.oData.sArrInputTimeFormats[2]) + sMax = "11:59 PM"; + else if(oDTP.oData.sTimeFormat === oDTP.oData.sArrInputTimeFormats[3]) + sMax = "23:59"; + + oDTP.oData.dMaxValue = oDTP._parseTime(sMax); + } + } + if($.cf._isValid(sMax)) + { + oDTP.oData.dMaxValue = oDTP._parseTime(sMax); + + if(!$.cf._isValid(sMin)) + { + if(oDTP.oData.sTimeFormat === oDTP.oData.sArrInputTimeFormats[0]) + sMin = "12:00:00 AM"; + else if(oDTP.oData.sTimeFormat === oDTP.oData.sArrInputTimeFormats[1]) + sMin = "00:00:00"; + else if(oDTP.oData.sTimeFormat === oDTP.oData.sArrInputTimeFormats[2]) + sMin = "12:00 AM"; + else if(oDTP.oData.sTimeFormat === oDTP.oData.sArrInputTimeFormats[3]) + sMin = "00:00"; + + oDTP.oData.dMinValue = oDTP._parseTime(sMin); + } + } + + if(sStartEnd !== "" && ($.cf._compare(sStartEnd, "start") || $.cf._compare(sStartEnd, "end")) && sStartEndElem !== "") + { + if($(sStartEndElem).length >= 1) + { + sTempTime = oDTP._getValueOfElement($(sStartEndElem)); + if(sTempTime !== "") + { + if(oDTP.settings.parseDateTimeString) + dTempDate = oDTP.settings.parseDateTimeString.call(oDTP, sTempTime, sMode, sFormat, $(sStartEndElem)); + else + dTempTime = oDTP._parseTime(sTempTime); + + if($.cf._compare(sStartEnd, "start")) + { + dTempTime.setMinutes(dTempTime.getMinutes() - 1); + if($.cf._isValid(sMax)) + { + if(oDTP._compareTime(dTempTime, oDTP.oData.dMaxValue) === 2) + oDTP.oData.dMaxValue = new Date(dTempTime); + } + else + oDTP.oData.dMaxValue = new Date(dTempTime); + } + else if($.cf._compare(sStartEnd, "end")) + { + dTempTime.setMinutes(dTempTime.getMinutes() + 1); + if($.cf._isValid(sMin)) + { + if(oDTP._compareTime(dTempTime, oDTP.oData.dMinValue) === 3) + oDTP.oData.dMinValue = new Date(dTempTime); + } + else + oDTP.oData.dMinValue = new Date(dTempTime); + } + } + } + } + + if(oDTP.settings.parseDateTimeString) + oDTP.oData.dCurrentDate = oDTP.settings.parseDateTimeString.call(oDTP, sCurrent, sMode, sFormat, $(oElement)); + else + oDTP.oData.dCurrentDate = oDTP._parseTime(sCurrent); + } + else if(oDTP.oData.bDateTimeMode) + { + sMin = sMinValue || oDTP.settings.minDateTime; + sMax = sMaxValue || oDTP.settings.maxDateTime; + + oDTP.oData.sDateTimeFormat = sFormat; + oDTP.oData.bIs12Hour = oDTP.getIs12Hour(); + + if($.cf._isValid(sMin)) + oDTP.oData.dMinValue = oDTP._parseDateTime(sMin); + if($.cf._isValid(sMax)) + oDTP.oData.dMaxValue = oDTP._parseDateTime(sMax); + + if(sStartEnd !== "" && ($.cf._compare(sStartEnd, "start") || $.cf._compare(sStartEnd, "end")) && sStartEndElem !== "") + { + if($(sStartEndElem).length >= 1) + { + sTempDateTime = oDTP._getValueOfElement($(sStartEndElem)); + if(sTempDateTime !== "") + { + if(oDTP.settings.parseDateTimeString) + dTempDateTime = oDTP.settings.parseDateTimeString.call(oDTP, sTempDateTime, sMode, sFormat, $(sStartEndElem)); + else + dTempDateTime = oDTP._parseDateTime(sTempDateTime); + + if($.cf._compare(sStartEnd, "start")) + { + if($.cf._isValid(sMax)) + { + if(oDTP._compareDateTime(dTempDateTime, oDTP.oData.dMaxValue) < 0) + oDTP.oData.dMaxValue = new Date(dTempDateTime); + } + else + oDTP.oData.dMaxValue = new Date(dTempDateTime); + } + else if($.cf._compare(sStartEnd, "end")) + { + if($.cf._isValid(sMin)) + { + if(oDTP._compareDateTime(dTempDateTime, oDTP.oData.dMinValue) > 0) + oDTP.oData.dMinValue = new Date(dTempDateTime); + } + else + oDTP.oData.dMinValue = new Date(dTempDateTime); + } + } + } + } + + if(oDTP.settings.parseDateTimeString) + oDTP.oData.dCurrentDate = oDTP.settings.parseDateTimeString.call(oDTP, sCurrent, sMode, sFormat, $(oElement)); + else + oDTP.oData.dCurrentDate = oDTP._parseDateTime(sCurrent); + } + + oDTP._setVariablesForDate(); + oDTP._modifyPicker(); + $(oDTP.element).fadeIn(oDTP.settings.animationDuration); + + if(oDTP.settings.afterShow) + { + setTimeout(function() + { + oDTP.settings.afterShow.call(oDTP, oElement); + }, oDTP.settings.animationDuration); + } + } + }, + + _hidePicker: function(iDuration, oElementToShow) + { + var oDTP = this; + + var oElement = oDTP.oData.oInputElement; + + if(oDTP.settings.beforeHide) + oDTP.settings.beforeHide.call(oDTP, oElement); + + if(!$.cf._isValid(iDuration)) + iDuration = oDTP.settings.animationDuration; + + if($.cf._isValid(oDTP.oData.oInputElement)) + { + $(oDTP.oData.oInputElement).blur(); + oDTP.oData.oInputElement = null; + } + + $(oDTP.element).fadeOut(iDuration); + if(iDuration === 0) + { + $(oDTP.element).find(".dtpicker-subcontent").html(""); + } + else + { + setTimeout(function() + { + $(oDTP.element).find(".dtpicker-subcontent").html(""); + }, iDuration); + } + + $(document).unbind("click.DateTimePicker keydown.DateTimePicker keyup.DateTimePicker"); + + if(oDTP.settings.afterHide) + { + if(iDuration === 0) + { + oDTP.settings.afterHide.call(oDTP, oElement); + } + else + { + setTimeout(function() + { + oDTP.settings.afterHide.call(oDTP, oElement); + }, iDuration); + } + } + + if($.cf._isValid(oElementToShow)) + oDTP._showPicker(oElementToShow); + }, + + _modifyPicker: function() + { + var oDTP = this; + + var sTitleContent, iNumberOfColumns; + var sArrFields = []; + if(oDTP.oData.bDateMode) + { + sTitleContent = oDTP.settings.titleContentDate; + iNumberOfColumns = 3; + + if(oDTP.oData.bArrMatchFormat[0]) // "dd-MM-yyyy" + { + sArrFields = ["day", "month", "year"]; + } + else if(oDTP.oData.bArrMatchFormat[1]) // "MM-dd-yyyy" + { + sArrFields = ["month", "day", "year"]; + } + else if(oDTP.oData.bArrMatchFormat[2]) // "yyyy-MM-dd" + { + sArrFields = ["year", "month", "day"]; + } + else if(oDTP.oData.bArrMatchFormat[3]) // "dd-MMM-yyyy" + { + sArrFields = ["day", "month", "year"]; + } + else if(oDTP.oData.bArrMatchFormat[4]) // "MM-yyyy" + { + iNumberOfColumns = 2; + sArrFields = ["month", "year"]; + } + else if(oDTP.oData.bArrMatchFormat[5]) // "MMM yyyy" + { + iNumberOfColumns = 2; + sArrFields = ["month", "year"]; + } + else if(oDTP.oData.bArrMatchFormat[6]) // "MMMM yyyy" + { + iNumberOfColumns = 2; + sArrFields = ["month", "year"]; + } + else if(oDTP.oData.bArrMatchFormat[7]) // "yyyy-MM" + { + iNumberOfColumns = 2; + sArrFields = ["year", "month"]; + } + } + else if(oDTP.oData.bTimeMode) + { + sTitleContent = oDTP.settings.titleContentTime; + if(oDTP.oData.bArrMatchFormat[0]) // hh:mm:ss AA + { + iNumberOfColumns = 4; + sArrFields = ["hour", "minutes", "seconds", "meridiem"]; + } + else if(oDTP.oData.bArrMatchFormat[1]) // HH:mm:ss + { + iNumberOfColumns = 3; + sArrFields = ["hour", "minutes", "seconds"]; + } + else if(oDTP.oData.bArrMatchFormat[2]) // hh:mm AA + { + iNumberOfColumns = 3; + sArrFields = ["hour", "minutes", "meridiem"]; + } + else if(oDTP.oData.bArrMatchFormat[3]) // HH:mm + { + iNumberOfColumns = 2; + sArrFields = ["hour", "minutes"]; + } + } + else if(oDTP.oData.bDateTimeMode) + { + sTitleContent = oDTP.settings.titleContentDateTime; + + if(oDTP.oData.bArrMatchFormat[0]) + { + iNumberOfColumns = 6; + sArrFields = ["day", "month", "year", "hour", "minutes", "seconds"]; + } + else if(oDTP.oData.bArrMatchFormat[1]) + { + iNumberOfColumns = 7; + sArrFields = ["day", "month", "year", "hour", "minutes", "seconds", "meridiem"]; + } + else if(oDTP.oData.bArrMatchFormat[2]) + { + iNumberOfColumns = 6; + sArrFields = ["month", "day", "year", "hour", "minutes", "seconds"]; + } + else if(oDTP.oData.bArrMatchFormat[3]) + { + iNumberOfColumns = 7; + sArrFields = ["month", "day", "year", "hour", "minutes", "seconds", "meridiem"]; + } + else if(oDTP.oData.bArrMatchFormat[4]) + { + iNumberOfColumns = 6; + sArrFields = ["year", "month", "day", "hour", "minutes", "seconds"]; + } + else if(oDTP.oData.bArrMatchFormat[5]) + { + iNumberOfColumns = 7; + sArrFields = ["year", "month", "day", "hour", "minutes", "seconds", "meridiem"]; + } + else if(oDTP.oData.bArrMatchFormat[6]) + { + iNumberOfColumns = 6; + sArrFields = ["day", "month", "year", "hour", "minutes", "seconds"]; + } + else if(oDTP.oData.bArrMatchFormat[7]) + { + iNumberOfColumns = 7; + sArrFields = ["day", "month", "year", "hour", "minutes", "seconds", "meridiem"]; + } + else if(oDTP.oData.bArrMatchFormat[8]) + { + iNumberOfColumns = 5; + sArrFields = ["day", "month", "year", "hour", "minutes"]; + } + else if(oDTP.oData.bArrMatchFormat[9]) + { + iNumberOfColumns = 6; + sArrFields = ["day", "month", "year", "hour", "minutes", "meridiem"]; + } + else if(oDTP.oData.bArrMatchFormat[10]) + { + iNumberOfColumns = 5; + sArrFields = ["month", "day", "year", "hour", "minutes"]; + } + else if(oDTP.oData.bArrMatchFormat[11]) + { + iNumberOfColumns = 6; + sArrFields = ["month", "day", "year", "hour", "minutes", "meridiem"]; + } + else if(oDTP.oData.bArrMatchFormat[12]) + { + iNumberOfColumns = 5; + sArrFields = ["year", "month", "day", "hour", "minutes"]; + } + else if(oDTP.oData.bArrMatchFormat[13]) + { + iNumberOfColumns = 6; + sArrFields = ["year", "month", "day", "hour", "minutes", "meridiem"]; + } + else if(oDTP.oData.bArrMatchFormat[14]) + { + iNumberOfColumns = 5; + sArrFields = ["day", "month", "year", "hour", "minutes"]; + } + else if(oDTP.oData.bArrMatchFormat[15]) + { + iNumberOfColumns = 6; + sArrFields = ["day", "month", "year", "hour", "minutes", "meridiem"]; + } + } + + + //-------------------------------------------------------------------- + var sColumnClass = "dtpicker-comp" + iNumberOfColumns, + bDisplayHeaderCloseButton = false, + bDisplaySetButton = false, + bDisplayClearButton = false, + iTempIndex; + + for(iTempIndex = 0; iTempIndex < oDTP.settings.buttonsToDisplay.length; iTempIndex++) + { + if($.cf._compare(oDTP.settings.buttonsToDisplay[iTempIndex], "HeaderCloseButton")) + bDisplayHeaderCloseButton = true; + else if($.cf._compare(oDTP.settings.buttonsToDisplay[iTempIndex], "SetButton")) + bDisplaySetButton = true; + else if($.cf._compare(oDTP.settings.buttonsToDisplay[iTempIndex], "ClearButton")) + bDisplayClearButton = true; + } + + var sHeader = ""; + if(oDTP.settings.showHeader) + { + sHeader += "
"; + sHeader += "
" + sTitleContent + "
"; + if(bDisplayHeaderCloseButton) + sHeader += "×"; + sHeader += "
"; + sHeader += "
"; + } + + //-------------------------------------------------------------------- + + var sDTPickerComp = ""; + sDTPickerComp += "
"; + + for(iTempIndex = 0; iTempIndex < iNumberOfColumns; iTempIndex++) + { + var sFieldName = sArrFields[iTempIndex]; + + sDTPickerComp += "
"; + sDTPickerComp += "
"; + sDTPickerComp += "" + oDTP.settings.incrementButtonContent + ""; + if(oDTP.settings.readonlyInputs) + sDTPickerComp += ""; + else + sDTPickerComp += ""; + sDTPickerComp += "" + oDTP.settings.decrementButtonContent + ""; + if(oDTP.settings.labels) + sDTPickerComp += "
" + oDTP.settings.labels[sFieldName] + "
"; + sDTPickerComp += "
"; + sDTPickerComp += "
"; + } + + sDTPickerComp += "
"; + + //-------------------------------------------------------------------- + + var sButtonContClass = ""; + if(bDisplaySetButton && bDisplayClearButton) + sButtonContClass = " dtpicker-twoButtons"; + else + sButtonContClass = " dtpicker-singleButton"; + + var sDTPickerButtons = ""; + sDTPickerButtons += "
"; + if(bDisplaySetButton) + sDTPickerButtons += "" + oDTP.settings.setButtonContent + ""; + if(bDisplayClearButton) + sDTPickerButtons += "" + oDTP.settings.clearButtonContent + ""; + sDTPickerButtons += "
"; + + //-------------------------------------------------------------------- + + var sTempStr = sHeader + sDTPickerComp + sDTPickerButtons; + + $(oDTP.element).find(".dtpicker-subcontent").html(sTempStr); + + oDTP._setCurrentDate(); + oDTP._addEventHandlersForPicker(); + }, + + _addEventHandlersForPicker: function() + { + var oDTP = this; + var classType, keyCode, $nextElem; + + if(!oDTP.settings.isInline) + { + $(document).on("click.DateTimePicker", function(e) + { + if (oDTP.oData.bElemFocused) + oDTP._hidePicker(""); + }); + } + + $(document).on("keydown.DateTimePicker", function(e) + { + keyCode = parseInt(e.keyCode ? e.keyCode : e.which); + if(! $(".dtpicker-compValue").is(":focus") && keyCode === 9) // TAB + { + oDTP._setButtonAction(true); + $("[tabIndex=" + (oDTP.oData.iTabIndex + 1) + "]").focus(); + return false; + } + else if($(".dtpicker-compValue").is(":focus")) + { + /*if(keyCode === 37) // Left Arrow + { + oDTP._setButtonAction(true); + $nextElem = $(".dtpicker-compValue:focus").parent().prev().children(".dtpicker-compValue"); + $nextElem.focus(); + console.log('Left Arrow '); + console.log($nextElem); + return false; + } + else if(keyCode === 39) // Right Arrow + { + oDTP._setButtonAction(true); + var compVal = $(".dtpicker-compValue:focus"); + $nextElem = $(".dtpicker-compValue:focus").parent(".dtpicker-comp").next().children(".dtpicker-compValue"); + $nextElem.focus(); + console.log('Right Arrow '); + console.log($nextElem); + return false; + } + else*/ + if(keyCode === 38) // Up Arrow + { + classType = $(".dtpicker-compValue:focus").parent().attr("class"); + oDTP._incrementDecrementActionsUsingArrowAndMouse(classType, "inc"); + return false; + } + else if(keyCode === 40) // Down Arrow + { + classType = $(".dtpicker-compValue:focus").parent().attr("class"); + oDTP._incrementDecrementActionsUsingArrowAndMouse(classType, "dec"); + return false; + } + } + }); + + if(!oDTP.settings.isInline) + { + $(document).on("keydown.DateTimePicker", function(e) + { + keyCode = parseInt(e.keyCode ? e.keyCode : e.which); + // console.log("keydown " + keyCode); + if(! $(".dtpicker-compValue").is(":focus") && keyCode !== 9) + { + //if(keyCode !== 37 && keyCode !== 39) + oDTP._hidePicker(""); + } + }); + } + + $(".dtpicker-cont *").click(function(e) + { + e.stopPropagation(); + }); + + if(!oDTP.settings.readonlyInputs) + { + $(".dtpicker-compValue").not(".month .dtpicker-compValue, .meridiem .dtpicker-compValue").keyup(function() + { + this.value = this.value.replace(/[^0-9\.]/g,""); + }); + + $(".dtpicker-compValue").focus(function() + { + oDTP.oData.bElemFocused = true; + $(this).select(); + }); + + $(".dtpicker-compValue").blur(function() + { + oDTP._getValuesFromInputBoxes(); + oDTP._setCurrentDate(); + + oDTP.oData.bElemFocused = false; + var $oParentElem = $(this).parent().parent(); + setTimeout(function() + { + if($oParentElem.is(":last-child") && !oDTP.oData.bElemFocused) + { + oDTP._setButtonAction(false); + } + }, 50); + }); + + $(".dtpicker-compValue").keyup(function(e) + { + var $oTextField = $(this), + + sTextBoxVal = $oTextField.val(), + iLength = sTextBoxVal.length, + sNewTextBoxVal; + + if($oTextField.parent().hasClass("day") || $oTextField.parent().hasClass("hour") || $oTextField.parent().hasClass("minutes") || $oTextField.parent().hasClass("meridiem")) + { + if(iLength > 2) + { + sNewTextBoxVal = sTextBoxVal.slice(0, 2); + $oTextField.val(sNewTextBoxVal); + } + } + else if($oTextField.parent().hasClass("month")) + { + if(iLength > 3) + { + sNewTextBoxVal = sTextBoxVal.slice(0, 3); + $oTextField.val(sNewTextBoxVal); + } + } + else if($oTextField.parent().hasClass("year")) + { + if(iLength > 4) + { + sNewTextBoxVal = sTextBoxVal.slice(0, 4); + $oTextField.val(sNewTextBoxVal); + } + } + + if(parseInt(e.keyCode ? e.keyCode : e.which) === 9) + $(this).select(); + }); + } + + $(oDTP.element).find(".dtpicker-compValue").on("mousewheel DOMMouseScroll onmousewheel", function(e) + { + if($(".dtpicker-compValue").is(":focus")) + { + var delta = Math.max(-1, Math.min(1, e.originalEvent.wheelDelta)); + + if(delta > 0) + { + classType = $(".dtpicker-compValue:focus").parent().attr("class"); + oDTP._incrementDecrementActionsUsingArrowAndMouse(classType, "inc"); + } + else + { + classType = $(".dtpicker-compValue:focus").parent().attr("class"); + oDTP._incrementDecrementActionsUsingArrowAndMouse(classType, "dec"); + } + return false; + } + }); + + //----------------------------------------------------------------------- + + $(oDTP.element).find(".dtpicker-close").click(function(e) + { + if(oDTP.settings.buttonClicked) + oDTP.settings.buttonClicked.call(oDTP, "CLOSE", oDTP.oData.oInputElement); + if(!oDTP.settings.isInline) + oDTP._hidePicker(""); + }); + + $(oDTP.element).find(".dtpicker-buttonSet").click(function(e) + { + if(oDTP.settings.buttonClicked) + oDTP.settings.buttonClicked.call(oDTP, "SET", oDTP.oData.oInputElement); + oDTP._setButtonAction(false); + }); + + $(oDTP.element).find(".dtpicker-buttonClear").click(function(e) + { + if(oDTP.settings.buttonClicked) + oDTP.settings.buttonClicked.call(oDTP, "CLEAR", oDTP.oData.oInputElement); + oDTP._clearButtonAction(); + }); + + // ---------------------------------------------------------------------------- + + //console.log((oDTP.settings.captureTouchHold || oDTP.settings.captureMouseHold)); + if(oDTP.settings.captureTouchHold || oDTP.settings.captureMouseHold) + { + var sHoldEvents = ""; + if(oDTP.settings.captureTouchHold && oDTP.oData.bIsTouchDevice) + sHoldEvents += "touchstart touchmove touchend "; + if(oDTP.settings.captureMouseHold) + sHoldEvents += "mousedown mouseup"; + + $(".dtpicker-cont *").on(sHoldEvents, function(e) + { + oDTP._clearIntervalForTouchEvents(); + }); + + oDTP._bindTouchEvents("day"); + oDTP._bindTouchEvents("month"); + oDTP._bindTouchEvents("year"); + oDTP._bindTouchEvents("hour"); + oDTP._bindTouchEvents("minutes"); + oDTP._bindTouchEvents("seconds"); + } + else + { + $(oDTP.element).find(".day .increment, .day .increment *").click(function(e) + { + oDTP.oData.iCurrentDay++; + oDTP._setCurrentDate(); + oDTP._setOutputOnIncrementOrDecrement(); + }); + + $(oDTP.element).find(".day .decrement, .day .decrement *").click(function(e) + { + oDTP.oData.iCurrentDay--; + oDTP._setCurrentDate(); + oDTP._setOutputOnIncrementOrDecrement(); + }); + + $(oDTP.element).find(".month .increment, .month .increment *").click(function(e) + { + oDTP.oData.iCurrentMonth++; + oDTP._setCurrentDate(); + oDTP._setOutputOnIncrementOrDecrement(); + }); + + $(oDTP.element).find(".month .decrement, .month .decrement *").click(function(e) + { + oDTP.oData.iCurrentMonth--; + oDTP._setCurrentDate(); + oDTP._setOutputOnIncrementOrDecrement(); + }); + + $(oDTP.element).find(".year .increment, .year .increment *").click(function(e) + { + oDTP.oData.iCurrentYear++; + oDTP._setCurrentDate(); + oDTP._setOutputOnIncrementOrDecrement(); + }); + + $(oDTP.element).find(".year .decrement, .year .decrement *").click(function(e) + { + oDTP.oData.iCurrentYear--; + oDTP._setCurrentDate(); + oDTP._setOutputOnIncrementOrDecrement(); + }); + + $(oDTP.element).find(".hour .increment, .hour .increment *").click(function(e) + { + oDTP.oData.iCurrentHour++; + oDTP._setCurrentDate(); + oDTP._setOutputOnIncrementOrDecrement(); + }); + + $(oDTP.element).find(".hour .decrement, .hour .decrement *").click(function(e) + { + oDTP.oData.iCurrentHour--; + oDTP._setCurrentDate(); + oDTP._setOutputOnIncrementOrDecrement(); + }); + + $(oDTP.element).find(".minutes .increment, .minutes .increment *").click(function(e) + { + oDTP.oData.iCurrentMinutes += oDTP.settings.minuteInterval; + oDTP._setCurrentDate(); + oDTP._setOutputOnIncrementOrDecrement(); + }); + + $(oDTP.element).find(".minutes .decrement, .minutes .decrement *").click(function(e) + { + oDTP.oData.iCurrentMinutes -= oDTP.settings.minuteInterval; + oDTP._setCurrentDate(); + oDTP._setOutputOnIncrementOrDecrement(); + }); + + $(oDTP.element).find(".seconds .increment, .seconds .increment *").click(function(e) + { + oDTP.oData.iCurrentSeconds += oDTP.settings.secondsInterval; + oDTP._setCurrentDate(); + oDTP._setOutputOnIncrementOrDecrement(); + }); + + $(oDTP.element).find(".seconds .decrement, .seconds .decrement *").click(function(e) + { + oDTP.oData.iCurrentSeconds -= oDTP.settings.secondsInterval; + oDTP._setCurrentDate(); + oDTP._setOutputOnIncrementOrDecrement(); + }); + } + + $(oDTP.element).find(".meridiem .dtpicker-compButton, .meridiem .dtpicker-compButton *").click(function(e) + { + if($.cf._compare(oDTP.oData.sCurrentMeridiem, "AM")) + { + oDTP.oData.sCurrentMeridiem = "PM"; + oDTP.oData.iCurrentHour += 12; + } + else if($.cf._compare(oDTP.oData.sCurrentMeridiem, "PM")) + { + oDTP.oData.sCurrentMeridiem = "AM"; + oDTP.oData.iCurrentHour -= 12; + } + oDTP._setCurrentDate(); + oDTP._setOutputOnIncrementOrDecrement(); + }); + }, + + _adjustMinutes: function(iMinutes) + { + var oDTP = this; + if(oDTP.settings.roundOffMinutes && oDTP.settings.minuteInterval !== 1) + { + iMinutes = (iMinutes % oDTP.settings.minuteInterval) ? (iMinutes - (iMinutes % oDTP.settings.minuteInterval) + oDTP.settings.minuteInterval) : iMinutes; + } + return iMinutes; + }, + + _adjustSeconds: function(iSeconds) + { + var oDTP = this; + if(oDTP.settings.roundOffSeconds && oDTP.settings.secondsInterval !== 1) + { + iSeconds = (iSeconds % oDTP.settings.secondsInterval) ? (iSeconds - (iSeconds % oDTP.settings.secondsInterval) + oDTP.settings.secondsInterval) : iSeconds; + } + return iSeconds; + }, + + _getValueOfElement: function(oElem) + { + var oDTP = this; + var sElemValue = ""; + + if($.cf._compare($(oElem).prop("tagName"), "INPUT")) + sElemValue = $(oElem).val(); + else + sElemValue = $(oElem).html(); + + return sElemValue; + }, + + _setValueOfElement: function(sElemValue, $oElem) + { + var oDTP = this; + + if(!$.cf._isValid($oElem)) + $oElem = $(oDTP.oData.oInputElement); + + if($.cf._compare($oElem.prop("tagName"), "INPUT")) + $oElem.val(sElemValue); + else + $oElem.html(sElemValue); + + var dElemValue = oDTP.getDateObjectForInputField($oElem); + + if(oDTP.settings.settingValueOfElement) + oDTP.settings.settingValueOfElement.call(oDTP, sElemValue, dElemValue, $oElem); + + $oElem.change(); + + return sElemValue; + }, + + _bindTouchEvents: function(type) + { + var oDTP = this; + + $(oDTP.element).find("." + type + " .increment, ." + type + " .increment *").on("touchstart mousedown", function(e) + { + e.stopPropagation(); + if(!$.cf._isValid(oDTP.oData.sTouchButton)) + { + oDTP.oData.iTouchStart = (new Date()).getTime(); + oDTP.oData.sTouchButton = type + "-inc"; + + oDTP._setIntervalForTouchEvents(); + } + }); + + $(oDTP.element).find("." + type + " .increment, ." + type + " .increment *").on("touchend mouseup", function(e) + { + e.stopPropagation(); + oDTP._clearIntervalForTouchEvents(); + }); + + $(oDTP.element).find("." + type + " .decrement, ." + type + " .decrement *").on("touchstart mousedown", function(e) + { + e.stopPropagation(); + if(!$.cf._isValid(oDTP.oData.sTouchButton)) + { + oDTP.oData.iTouchStart = (new Date()).getTime(); + oDTP.oData.sTouchButton = type + "-dec"; + + oDTP._setIntervalForTouchEvents(); + } + }); + + $(oDTP.element).find("." + type + " .decrement, ." + type + " .decrement *").on("touchend mouseup", function(e) + { + e.stopPropagation(); + oDTP._clearIntervalForTouchEvents(); + }); + }, + + _setIntervalForTouchEvents: function() + { + var oDTP = this; + + var iInterval = oDTP.oData.bIsTouchDevice ? oDTP.settings.touchHoldInterval : oDTP.settings.mouseHoldInterval; + if(!$.cf._isValid(oDTP.oData.oTimeInterval)) + { + var iDiff; + + oDTP.oData.oTimeInterval = setInterval(function() + { + iDiff = ((new Date()).getTime() - oDTP.oData.iTouchStart); + if(iDiff > iInterval && $.cf._isValid(oDTP.oData.sTouchButton)) + { + if(oDTP.oData.sTouchButton === "day-inc") + { + oDTP.oData.iCurrentDay++; + } + else if(oDTP.oData.sTouchButton === "day-dec") + { + oDTP.oData.iCurrentDay--; + } + else if(oDTP.oData.sTouchButton === "month-inc") + { + oDTP.oData.iCurrentMonth++; + } + else if(oDTP.oData.sTouchButton === "month-dec") + { + oDTP.oData.iCurrentMonth--; + } + else if(oDTP.oData.sTouchButton === "year-inc") + { + oDTP.oData.iCurrentYear++; + } + else if(oDTP.oData.sTouchButton === "year-dec") + { + oDTP.oData.iCurrentYear--; + } + else if(oDTP.oData.sTouchButton === "hour-inc") + { + oDTP.oData.iCurrentHour++; + } + else if(oDTP.oData.sTouchButton === "hour-dec") + { + oDTP.oData.iCurrentHour--; + } + else if(oDTP.oData.sTouchButton === "minute-inc") + { + oDTP.oData.iCurrentMinutes += oDTP.settings.minuteInterval; + } + else if(oDTP.oData.sTouchButton === "minute-dec") + { + oDTP.oData.iCurrentMinutes -= oDTP.settings.minuteInterval; + } + else if(oDTP.oData.sTouchButton === "second-inc") + { + oDTP.oData.iCurrentSeconds += oDTP.settings.secondsInterval; + } + else if(oDTP.oData.sTouchButton === "second-dec") + { + oDTP.oData.iCurrentSeconds -= oDTP.settings.secondsInterval; + } + + oDTP._setCurrentDate(); + oDTP._setOutputOnIncrementOrDecrement(); + + oDTP.oData.iTouchStart = (new Date()).getTime(); + } + }, iInterval); + } + }, + + _clearIntervalForTouchEvents: function() + { + var oDTP = this; + + clearInterval(oDTP.oData.oTimeInterval); + if($.cf._isValid(oDTP.oData.sTouchButton)) + { + oDTP.oData.sTouchButton = null; + oDTP.oData.iTouchStart = 0; + } + oDTP.oData.oTimeInterval = null; + }, + + _incrementDecrementActionsUsingArrowAndMouse: function(type, action) + { + var oDTP = this; + + if(type.includes("day")) + { + if (action === "inc") oDTP.oData.iCurrentDay++; + else if (action === "dec") oDTP.oData.iCurrentDay--; + } + else if(type.includes("month")) + { + if (action === "inc") oDTP.oData.iCurrentMonth++; + else if (action === "dec") oDTP.oData.iCurrentMonth--; + } + else if(type.includes("year")) + { + if (action === "inc") oDTP.oData.iCurrentYear++; + else if (action === "dec") oDTP.oData.iCurrentYear--; + } + else if(type.includes("hour")) + { + if (action === "inc") oDTP.oData.iCurrentHour++; + else if (action === "dec") oDTP.oData.iCurrentHour--; + } + else if(type.includes("minutes")) + { + if (action === "inc") oDTP.oData.iCurrentMinutes += oDTP.settings.minuteInterval; + else if (action === "dec") oDTP.oData.iCurrentMinutes -= oDTP.settings.minuteInterval; + } + else if(type.includes("seconds")) + { + if (action === "inc") oDTP.oData.iCurrentSeconds += oDTP.settings.secondsInterval; + else if (action === "dec") oDTP.oData.iCurrentSeconds -= oDTP.settings.secondsInterval; + } + + oDTP._setCurrentDate(); + oDTP._setOutputOnIncrementOrDecrement(); + }, + + //----------------------------------------------------------------- + + _parseDate: function(sDate) + { + var oDTP = this; + + var dTempDate = (oDTP.settings.defaultDate ? new Date(oDTP.settings.defaultDate) : new Date()), + iDate = dTempDate.getDate(), + iMonth = dTempDate.getMonth(), + iYear = dTempDate.getFullYear(); + + if($.cf._isValid(sDate)) + { + if(typeof sDate === "string") + { + var sArrDate; + if(oDTP.oData.bArrMatchFormat[4] || oDTP.oData.bArrMatchFormat[5] || oDTP.oData.bArrMatchFormat[6]) + sArrDate = sDate.split(oDTP.settings.monthYearSeparator); + else + sArrDate = sDate.split(oDTP.settings.dateSeparator); + + if(oDTP.oData.bArrMatchFormat[0]) // "dd-MM-yyyy" + { + iDate = parseInt(sArrDate[0]); + iMonth = parseInt(sArrDate[1] - 1); + iYear = parseInt(sArrDate[2]); + } + else if(oDTP.oData.bArrMatchFormat[1]) // "MM-dd-yyyy" + { + iMonth = parseInt(sArrDate[0] - 1); + iDate = parseInt(sArrDate[1]); + iYear = parseInt(sArrDate[2]); + } + else if(oDTP.oData.bArrMatchFormat[2]) // "yyyy-MM-dd" + { + iYear = parseInt(sArrDate[0]); + iMonth = parseInt(sArrDate[1] - 1); + iDate = parseInt(sArrDate[2]); + } + else if(oDTP.oData.bArrMatchFormat[3]) // "dd-MMM-yyyy" + { + iDate = parseInt(sArrDate[0]); + iMonth = oDTP._getShortMonthIndex(sArrDate[1]); + iYear = parseInt(sArrDate[2]); + } + else if(oDTP.oData.bArrMatchFormat[4]) // "MM-yyyy" + { + iDate = 1; + iMonth = parseInt(sArrDate[0]) - 1; + iYear = parseInt(sArrDate[1]); + } + else if(oDTP.oData.bArrMatchFormat[5]) // "MMM yyyy" + { + iDate = 1; + iMonth = oDTP._getShortMonthIndex(sArrDate[0]); + iYear = parseInt(sArrDate[1]); + } + else if(oDTP.oData.bArrMatchFormat[6]) // "MMMM yyyy" + { + iDate = 1; + iMonth = oDTP._getFullMonthIndex(sArrDate[0]); + iYear = parseInt(sArrDate[1]); + } + else if(oDTP.oData.bArrMatchFormat[7]) // "yyyy MM" + { + iDate = 1; + iMonth = parseInt(sArrDate[1]) - 1; + iYear = parseInt(sArrDate[0]); + } + } + else + { + iDate = sDate.getDate(); + iMonth = sDate.getMonth(); + iYear = sDate.getFullYear(); + } + } + + dTempDate = new Date(iYear, iMonth, iDate, 0, 0, 0, 0); + return dTempDate; + }, + + _parseTime: function(sTime) + { + var oDTP = this; + + var dTempDate = (oDTP.settings.defaultDate ? new Date(oDTP.settings.defaultDate) : new Date()), + iDate = dTempDate.getDate(), + iMonth = dTempDate.getMonth(), + iYear = dTempDate.getFullYear(), + iHour = dTempDate.getHours(), + iMinutes = dTempDate.getMinutes(), + iSeconds = dTempDate.getSeconds(), + sArrTime, sMeridiem, sArrTimeComp, + bShowSeconds = oDTP.oData.bArrMatchFormat[0] || + oDTP.oData.bArrMatchFormat[1]; + + iSeconds = bShowSeconds ? oDTP._adjustSeconds(iSeconds) : 0; + + if($.cf._isValid(sTime)) + { + if(typeof sTime === "string") + { + if(oDTP.oData.bIs12Hour) + { + sArrTime = sTime.split(oDTP.settings.timeMeridiemSeparator); + sTime = sArrTime[0]; + sMeridiem = sArrTime[1]; + + if(!($.cf._compare(sMeridiem, "AM") || $.cf._compare(sMeridiem, "PM"))) + sMeridiem = ""; + } + + sArrTimeComp = sTime.split(oDTP.settings.timeSeparator); + iHour = parseInt(sArrTimeComp[0]); + iMinutes = parseInt(sArrTimeComp[1]); + + if(bShowSeconds) + { + iSeconds = parseInt(sArrTimeComp[2]); + iSeconds = oDTP._adjustSeconds(iSeconds); + } + + if(iHour === 12 && $.cf._compare(sMeridiem, "AM")) + iHour = 0; + else if(iHour < 12 && $.cf._compare(sMeridiem, "PM")) + iHour += 12; + } + else + { + iHour = sTime.getHours(); + iMinutes = sTime.getMinutes(); + + if(bShowSeconds) + { + iSeconds = sTime.getSeconds(); + iSeconds = oDTP._adjustSeconds(iSeconds); + } + } + } + iMinutes = oDTP._adjustMinutes(iMinutes); + + dTempDate = new Date(iYear, iMonth, iDate, iHour, iMinutes, iSeconds, 0); + + return dTempDate; + }, + + _parseDateTime: function(sDateTime) + { + var oDTP = this; + + var dTempDate = (oDTP.settings.defaultDate ? new Date(oDTP.settings.defaultDate) : new Date()), + iDate = dTempDate.getDate(), + iMonth = dTempDate.getMonth(), + iYear = dTempDate.getFullYear(), + iHour = dTempDate.getHours(), + iMinutes = dTempDate.getMinutes(), + iSeconds = dTempDate.getSeconds(), + sMeridiem = "", + sArrDateTime, sArrDate, sTime, sArrTimeComp, sArrTime, + bShowSeconds = oDTP.oData.bArrMatchFormat[0] || // "dd-MM-yyyy HH:mm:ss" + oDTP.oData.bArrMatchFormat[1] || // ""dd-MM-yyyy hh:mm:ss AA" + oDTP.oData.bArrMatchFormat[2] || // "MM-dd-yyyy HH:mm:ss" + oDTP.oData.bArrMatchFormat[3] || // "MM-dd-yyyy hh:mm:ss AA" + oDTP.oData.bArrMatchFormat[4] || // "yyyy-MM-dd HH:mm:ss" + oDTP.oData.bArrMatchFormat[5] || // "yyyy-MM-dd hh:mm:ss AA" + oDTP.oData.bArrMatchFormat[6] || // "dd-MMM-yyyy HH:mm:ss" + oDTP.oData.bArrMatchFormat[7]; // "dd-MMM-yyyy hh:mm:ss AA" + + iSeconds = bShowSeconds ? oDTP._adjustSeconds(iSeconds) : 0; + + if($.cf._isValid(sDateTime)) + { + if(typeof sDateTime === "string") + { + sArrDateTime = sDateTime.split(oDTP.settings.dateTimeSeparator); + sArrDate = sArrDateTime[0].split(oDTP.settings.dateSeparator); + + if(oDTP.oData.bArrMatchFormat[0] || // "dd-MM-yyyy HH:mm:ss" + oDTP.oData.bArrMatchFormat[1] || // ""dd-MM-yyyy hh:mm:ss AA" + oDTP.oData.bArrMatchFormat[8] || // "dd-MM-yyyy HH:mm" + oDTP.oData.bArrMatchFormat[9]) // "dd-MM-yyyy hh:mm AA" + { + iDate = parseInt(sArrDate[0]); + iMonth = parseInt(sArrDate[1] - 1); + iYear = parseInt(sArrDate[2]); + } + else if(oDTP.oData.bArrMatchFormat[2] || // "MM-dd-yyyy HH:mm:ss" + oDTP.oData.bArrMatchFormat[3] || // "MM-dd-yyyy hh:mm:ss AA" + oDTP.oData.bArrMatchFormat[10] || // "MM-dd-yyyy HH:mm" + oDTP.oData.bArrMatchFormat[11]) // "MM-dd-yyyy hh:mm AA" + { + iMonth = parseInt(sArrDate[0] - 1); + iDate = parseInt(sArrDate[1]); + iYear = parseInt(sArrDate[2]); + } + else if(oDTP.oData.bArrMatchFormat[4] || // "yyyy-MM-dd HH:mm:ss" + oDTP.oData.bArrMatchFormat[5] || // "yyyy-MM-dd hh:mm:ss AA" + oDTP.oData.bArrMatchFormat[12] || // "yyyy-MM-dd HH:mm" + oDTP.oData.bArrMatchFormat[13]) // "yyyy-MM-dd hh:mm AA" + { + iYear = parseInt(sArrDate[0]); + iMonth = parseInt(sArrDate[1] - 1); + iDate = parseInt(sArrDate[2]); + } + else if(oDTP.oData.bArrMatchFormat[6] || // "dd-MMM-yyyy HH:mm:ss" + oDTP.oData.bArrMatchFormat[7] || // "dd-MMM-yyyy hh:mm:ss AA" + oDTP.oData.bArrMatchFormat[14] || // "dd-MMM-yyyy HH:mm:ss" + oDTP.oData.bArrMatchFormat[15]) // "dd-MMM-yyyy hh:mm:ss AA" + { + iDate = parseInt(sArrDate[0]); + iMonth = oDTP._getShortMonthIndex(sArrDate[1]); + iYear = parseInt(sArrDate[2]); + } + + sTime = sArrDateTime[1]; + if($.cf._isValid(sTime)) + { + if(oDTP.oData.bIs12Hour) + { + if($.cf._compare(oDTP.settings.dateTimeSeparator, oDTP.settings.timeMeridiemSeparator) && (sArrDateTime.length === 3)) + sMeridiem = sArrDateTime[2]; + else + { + sArrTimeComp = sTime.split(oDTP.settings.timeMeridiemSeparator); + sTime = sArrTimeComp[0]; + sMeridiem = sArrTimeComp[1]; + } + + if(!($.cf._compare(sMeridiem, "AM") || $.cf._compare(sMeridiem, "PM"))) + sMeridiem = ""; + } + + sArrTime = sTime.split(oDTP.settings.timeSeparator); + + iHour = parseInt(sArrTime[0]); + iMinutes = parseInt(sArrTime[1]); + if(bShowSeconds) + { + iSeconds = parseInt(sArrTime[2]); + } + + if(iHour === 12 && $.cf._compare(sMeridiem, "AM")) + iHour = 0; + else if(iHour < 12 && $.cf._compare(sMeridiem, "PM")) + iHour += 12; + } + } + else + { + iDate = sDateTime.getDate(); + iMonth = sDateTime.getMonth(); + iYear = sDateTime.getFullYear(); + + iHour = sDateTime.getHours(); + iMinutes = sDateTime.getMinutes(); + + if(bShowSeconds) + { + iSeconds = sDateTime.getSeconds(); + iSeconds = oDTP._adjustSeconds(iSeconds); + } + } + } + iMinutes = oDTP._adjustMinutes(iMinutes); + + dTempDate = new Date(iYear, iMonth, iDate, iHour, iMinutes, iSeconds, 0); + return dTempDate; + }, + + _getShortMonthIndex: function(sMonthName) + { + var oDTP = this; + + for(var iTempIndex = 0; iTempIndex < oDTP.settings.shortMonthNames.length; iTempIndex++) + { + if($.cf._compare(sMonthName, oDTP.settings.shortMonthNames[iTempIndex])) + return iTempIndex; + } + }, + + _getFullMonthIndex: function(sMonthName) + { + var oDTP = this; + + for(var iTempIndex = 0; iTempIndex < oDTP.settings.fullMonthNames.length; iTempIndex++) + { + if($.cf._compare(sMonthName, oDTP.settings.fullMonthNames[iTempIndex])) + return iTempIndex; + } + }, + + // Public Method + getIs12Hour: function(sMode, sFormat) + { + var oDTP = this; + + var bIs12Hour = false, + iArgsLength = Function.length; + + oDTP._setMatchFormat(iArgsLength, sMode, sFormat); + + if(oDTP.oData.bTimeMode) + { + bIs12Hour = oDTP.oData.bArrMatchFormat[0] || + oDTP.oData.bArrMatchFormat[2]; + } + else if(oDTP.oData.bDateTimeMode) + { + bIs12Hour = oDTP.oData.bArrMatchFormat[1] || + oDTP.oData.bArrMatchFormat[3] || + oDTP.oData.bArrMatchFormat[5] || + oDTP.oData.bArrMatchFormat[7] || + oDTP.oData.bArrMatchFormat[9] || + oDTP.oData.bArrMatchFormat[11] || + oDTP.oData.bArrMatchFormat[13] || + oDTP.oData.bArrMatchFormat[15]; + } + + oDTP._setMatchFormat(iArgsLength); + + return bIs12Hour; + }, + + //----------------------------------------------------------------- + + _setVariablesForDate: function(dInput, bIncludeTime, bSetMeridiem) + { + var oDTP = this; + + var dTemp, oDTV = {}, + bValidInput = $.cf._isValid(dInput); + if(bValidInput) + { + dTemp = new Date(dInput); + if(!$.cf._isValid(bIncludeTime)) + bIncludeTime = true; + if(!$.cf._isValid(bSetMeridiem)) + bSetMeridiem = true; + } + else + { + if (Object.prototype.toString.call(oDTP.oData.dCurrentDate) === "[object Date]" && isFinite(oDTP.oData.dCurrentDate)) + dTemp = new Date(oDTP.oData.dCurrentDate); + else + dTemp = new Date(); + + if(!$.cf._isValid(bIncludeTime)) + bIncludeTime = (oDTP.oData.bTimeMode || oDTP.oData.bDateTimeMode); + if(!$.cf._isValid(bSetMeridiem)) + bSetMeridiem = oDTP.oData.bIs12Hour; + } + + oDTV.iCurrentDay = dTemp.getDate(); + oDTV.iCurrentMonth = dTemp.getMonth(); + oDTV.iCurrentYear = dTemp.getFullYear(); + oDTV.iCurrentWeekday = dTemp.getDay(); + + if(bIncludeTime) + { + oDTV.iCurrentHour = dTemp.getHours(); + oDTV.iCurrentMinutes = dTemp.getMinutes(); + oDTV.iCurrentSeconds = dTemp.getSeconds(); + + if(bSetMeridiem) + { + oDTV.sCurrentMeridiem = oDTP._determineMeridiemFromHourAndMinutes(oDTV.iCurrentHour, oDTV.iCurrentMinutes); + } + } + + if(bValidInput) + return oDTV; + else + oDTP.oData = $.extend(oDTP.oData, oDTV); + }, + + _getValuesFromInputBoxes: function() + { + var oDTP = this; + + if(oDTP.oData.bDateMode || oDTP.oData.bDateTimeMode) + { + var sMonth, iMonth; + + sMonth = $(oDTP.element).find(".month .dtpicker-compValue").val(); + if(sMonth.length > 1) + sMonth = sMonth.charAt(0).toUpperCase() + sMonth.slice(1); + iMonth = oDTP.settings.shortMonthNames.indexOf(sMonth); + if(iMonth !== -1) + { + oDTP.oData.iCurrentMonth = parseInt(iMonth); + } + else + { + if(sMonth.match("^[+|-]?[0-9]+$")) + { + oDTP.oData.iCurrentMonth = parseInt(sMonth - 1); + } + } + + oDTP.oData.iCurrentDay = parseInt($(oDTP.element).find(".day .dtpicker-compValue").val()) || oDTP.oData.iCurrentDay; + oDTP.oData.iCurrentYear = parseInt($(oDTP.element).find(".year .dtpicker-compValue").val()) || oDTP.oData.iCurrentYear; + } + + if(oDTP.oData.bTimeMode || oDTP.oData.bDateTimeMode) + { + var iTempHour, iTempMinutes, iTempSeconds, sMeridiem; + + iTempHour = parseInt($(oDTP.element).find(".hour .dtpicker-compValue").val()); + iTempMinutes = oDTP._adjustMinutes(parseInt($(oDTP.element).find(".minutes .dtpicker-compValue").val())); + iTempSeconds = oDTP._adjustMinutes(parseInt($(oDTP.element).find(".seconds .dtpicker-compValue").val())); + + oDTP.oData.iCurrentHour = isNaN(iTempHour) ? oDTP.oData.iCurrentHour : iTempHour; + oDTP.oData.iCurrentMinutes = isNaN(iTempMinutes) ? oDTP.oData.iCurrentMinutes : iTempMinutes; + oDTP.oData.iCurrentSeconds = isNaN(iTempSeconds) ? oDTP.oData.iCurrentSeconds : iTempSeconds; + + if(oDTP.oData.iCurrentSeconds > 59) + { + oDTP.oData.iCurrentMinutes += oDTP.oData.iCurrentSeconds / 60; + oDTP.oData.iCurrentSeconds = oDTP.oData.iCurrentSeconds % 60; + } + if(oDTP.oData.iCurrentMinutes > 59) + { + oDTP.oData.iCurrentHour += oDTP.oData.iCurrentMinutes / 60; + oDTP.oData.iCurrentMinutes = oDTP.oData.iCurrentMinutes % 60; + } + + if(oDTP.oData.bIs12Hour) + { + if(oDTP.oData.iCurrentHour > 12) + oDTP.oData.iCurrentHour = (oDTP.oData.iCurrentHour % 12); + } + else + { + if(oDTP.oData.iCurrentHour > 23) + oDTP.oData.iCurrentHour = (oDTP.oData.iCurrentHour % 23); + } + + if(oDTP.oData.bIs12Hour) + { + sMeridiem = $(oDTP.element).find(".meridiem .dtpicker-compValue").val(); + if($.cf._compare(sMeridiem, "AM") || $.cf._compare(sMeridiem, "PM")) + oDTP.oData.sCurrentMeridiem = sMeridiem; + + if($.cf._compare(oDTP.oData.sCurrentMeridiem, "PM")) + { + if(oDTP.oData.iCurrentHour !== 12 && oDTP.oData.iCurrentHour < 13) + oDTP.oData.iCurrentHour += 12; + } + if($.cf._compare(oDTP.oData.sCurrentMeridiem, "AM") && oDTP.oData.iCurrentHour === 12) + oDTP.oData.iCurrentHour = 0; + } + } + }, + + _setCurrentDate: function() + { + var oDTP = this; + + if(oDTP.oData.bTimeMode || oDTP.oData.bDateTimeMode) + { + if(oDTP.oData.iCurrentSeconds > 59) + { + oDTP.oData.iCurrentMinutes += oDTP.oData.iCurrentSeconds / 60; + oDTP.oData.iCurrentSeconds = oDTP.oData.iCurrentSeconds % 60; + } + else if(oDTP.oData.iCurrentSeconds < 0) + { + oDTP.oData.iCurrentMinutes -= oDTP.settings.minuteInterval; + oDTP.oData.iCurrentSeconds += 60; + } + oDTP.oData.iCurrentMinutes = oDTP._adjustMinutes(oDTP.oData.iCurrentMinutes); + oDTP.oData.iCurrentSeconds = oDTP._adjustSeconds(oDTP.oData.iCurrentSeconds); + } + + var dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, oDTP.oData.iCurrentHour, oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0), + bGTMaxDate = false, bLTMinDate = false, + sFormat, oDate, oFormattedDate, oFormattedTime, + sDate, sTime, sDateTime; + + if(oDTP.oData.dMaxValue !== null) + bGTMaxDate = (dTempDate.getTime() > oDTP.oData.dMaxValue.getTime()); + if(oDTP.oData.dMinValue !== null) + bLTMinDate = (dTempDate.getTime() < oDTP.oData.dMinValue.getTime()); + + if(bGTMaxDate || bLTMinDate) + { + var bCDGTMaxDate = false, bCDLTMinDate = false; + if(oDTP.oData.dMaxValue !== null) + bCDGTMaxDate = (oDTP.oData.dCurrentDate.getTime() > oDTP.oData.dMaxValue.getTime()); + if(oDTP.oData.dMinValue !== null) + bCDLTMinDate = (oDTP.oData.dCurrentDate.getTime() < oDTP.oData.dMinValue.getTime()); + + if(!(bCDGTMaxDate || bCDLTMinDate)) + dTempDate = new Date(oDTP.oData.dCurrentDate); + else + { + if(bCDGTMaxDate) + { + dTempDate = new Date(oDTP.oData.dMaxValue); + console.log("Info : Date/Time/DateTime you entered is later than Maximum value, so DateTimePicker is showing Maximum value in Input Field."); + } + if(bCDLTMinDate) + { + dTempDate = new Date(oDTP.oData.dMinValue); + console.log("Info : Date/Time/DateTime you entered is earlier than Minimum value, so DateTimePicker is showing Minimum value in Input Field."); + } + console.log("Please enter proper Date/Time/DateTime values."); + } + } + + oDTP.oData.dCurrentDate = new Date(dTempDate); + oDTP._setVariablesForDate(); + + oDate = {}; sDate = ""; sTime = ""; sDateTime = ""; + + if(oDTP.oData.bDateMode || oDTP.oData.bDateTimeMode) + { + if(oDTP.oData.bDateMode && (oDTP.oData.bArrMatchFormat[4] || oDTP.oData.bArrMatchFormat[5] || oDTP.oData.bArrMatchFormat[6])) + oDTP.oData.iCurrentDay = 1; + + oFormattedDate = oDTP._formatDate(); + + $(oDTP.element).find(".day .dtpicker-compValue").val(oFormattedDate.dd); + + if(oDTP.oData.bDateMode) + { + if(oDTP.oData.bArrMatchFormat[4] || oDTP.oData.bArrMatchFormat[7]) // "MM-yyyy" + $(oDTP.element).find(".month .dtpicker-compValue").val(oFormattedDate.MM); + else if(oDTP.oData.bArrMatchFormat[6]) // "MMMM yyyy" + $(oDTP.element).find(".month .dtpicker-compValue").val(oFormattedDate.month); + else + $(oDTP.element).find(".month .dtpicker-compValue").val(oFormattedDate.monthShort); + } + else + $(oDTP.element).find(".month .dtpicker-compValue").val(oFormattedDate.monthShort); + + $(oDTP.element).find(".year .dtpicker-compValue").val(oFormattedDate.yyyy); + + if(oDTP.settings.formatHumanDate) + { + oDate = $.extend(oDate, oFormattedDate); + } + else + { + if(oDTP.oData.bDateMode && (oDTP.oData.bArrMatchFormat[4] || oDTP.oData.bArrMatchFormat[5] || oDTP.oData.bArrMatchFormat[6] || oDTP.oData.bArrMatchFormat[7])) + { + if(oDTP.oData.bArrMatchFormat[4]) + sDate = oFormattedDate.MM + oDTP.settings.monthYearSeparator + oFormattedDate.yyyy; + else if(oDTP.oData.bArrMatchFormat[5]) + sDate = oFormattedDate.monthShort + oDTP.settings.monthYearSeparator + oFormattedDate.yyyy; + else if(oDTP.oData.bArrMatchFormat[6]) + sDate = oFormattedDate.month + oDTP.settings.monthYearSeparator + oFormattedDate.yyyy; + else if(oDTP.oData.bArrMatchFormat[7]) + sDate = oFormattedDate.yyyy + oDTP.settings.monthYearSeparator + oFormattedDate.MM; + } + else + sDate = oFormattedDate.dayShort + ", " + oFormattedDate.month + " " + oFormattedDate.dd + ", " + oFormattedDate.yyyy; + } + } + if(oDTP.oData.bTimeMode || oDTP.oData.bDateTimeMode) + { + oFormattedTime = oDTP._formatTime(); + + if(oDTP.oData.bIs12Hour) + $(oDTP.element).find(".meridiem .dtpicker-compValue").val(oDTP.oData.sCurrentMeridiem); + $(oDTP.element).find(".hour .dtpicker-compValue").val(oFormattedTime.hour); + $(oDTP.element).find(".minutes .dtpicker-compValue").val(oFormattedTime.mm); + $(oDTP.element).find(".seconds .dtpicker-compValue").val(oFormattedTime.ss); + + if(oDTP.settings.formatHumanDate) + { + oDate = $.extend(oDate, oFormattedTime); + } + else + { + var bShowSecondsTime = (oDTP.oData.bTimeMode && ( + oDTP.oData.bArrMatchFormat[0] || + oDTP.oData.bArrMatchFormat[1])), + + bShowSecondsDateTime = (oDTP.oData.bDateTimeMode && + (oDTP.oData.bArrMatchFormat[0] || + oDTP.oData.bArrMatchFormat[1] || + oDTP.oData.bArrMatchFormat[2] || + oDTP.oData.bArrMatchFormat[3] || + oDTP.oData.bArrMatchFormat[4] || + oDTP.oData.bArrMatchFormat[5] || + oDTP.oData.bArrMatchFormat[6] || + oDTP.oData.bArrMatchFormat[7])); + + if(bShowSecondsTime || bShowSecondsDateTime) + sTime = oFormattedTime.hour + oDTP.settings.timeSeparator + oFormattedTime.mm + oDTP.settings.timeSeparator + oFormattedTime.ss; + else + sTime = oFormattedTime.hour + oDTP.settings.timeSeparator + oFormattedTime.mm; + + if(oDTP.oData.bIs12Hour) + sTime += oDTP.settings.timeMeridiemSeparator + oDTP.oData.sCurrentMeridiem; + } + } + + if(oDTP.settings.formatHumanDate) + { + if(oDTP.oData.bDateTimeMode) + sFormat = oDTP.oData.sDateFormat; + else if(oDTP.oData.bDateMode) + sFormat = oDTP.oData.sTimeFormat; + else if(oDTP.oData.bTimeMode) + sFormat = oDTP.oData.sDateTimeFormat; + + sDateTime = oDTP.settings.formatHumanDate.call(oDTP, oDate, oDTP.settings.mode, sFormat); + } + else + { + if(oDTP.oData.bDateTimeMode) + sDateTime = sDate + oDTP.settings.dateTimeSeparator + sTime; + else if(oDTP.oData.bDateMode) + sDateTime = sDate; + else if(oDTP.oData.bTimeMode) + sDateTime = sTime; + } + + $(oDTP.element).find(".dtpicker-value").html(sDateTime); + + oDTP._setButtons(); + }, + + _formatDate: function(oDTVP) + { + var oDTP = this; + var oDTV = {}, + sDay, sYear, + iMonth, sMonth, sMonthShort, sMonthFull, + iDayOfTheWeek, sDayOfTheWeek, sDayOfTheWeekFull; + + if($.cf._isValid(oDTVP)) + oDTV = $.extend({}, oDTVP); + else + { + oDTV.iCurrentDay = oDTP.oData.iCurrentDay; + oDTV.iCurrentMonth = oDTP.oData.iCurrentMonth; + oDTV.iCurrentYear = oDTP.oData.iCurrentYear; + oDTV.iCurrentWeekday = oDTP.oData.iCurrentWeekday; + } + + sDay = oDTV.iCurrentDay; + sDay = (sDay < 10) ? ("0" + sDay) : sDay; + iMonth = oDTV.iCurrentMonth; + sMonth = oDTV.iCurrentMonth + 1; + sMonth = (sMonth < 10) ? ("0" + sMonth) : sMonth; + sMonthShort = oDTP.settings.shortMonthNames[iMonth]; + sMonthFull = oDTP.settings.fullMonthNames[iMonth]; + sYear = oDTV.iCurrentYear; + iDayOfTheWeek = oDTV.iCurrentWeekday; + sDayOfTheWeek = oDTP.settings.shortDayNames[iDayOfTheWeek]; + sDayOfTheWeekFull = oDTP.settings.fullDayNames[iDayOfTheWeek]; + + return { + "dd": sDay, + "MM": sMonth, + "monthShort": sMonthShort, + "month": sMonthFull, + "yyyy": sYear, + "dayShort": sDayOfTheWeek, + "day": sDayOfTheWeekFull + }; + }, + + _formatTime: function(oDTVP) + { + var oDTP = this; + var oDTV = {}, + iHour24, sHour24, iHour12, sHour12, sHour, + sMinutes, sSeconds; + + if($.cf._isValid(oDTVP)) + oDTV = $.extend({}, oDTVP); + else + { + oDTV.iCurrentHour = oDTP.oData.iCurrentHour; + oDTV.iCurrentMinutes = oDTP.oData.iCurrentMinutes; + oDTV.iCurrentSeconds = oDTP.oData.iCurrentSeconds; + oDTV.sCurrentMeridiem = oDTP.oData.sCurrentMeridiem; + } + + iHour24 = oDTV.iCurrentHour; + sHour24 = (iHour24 < 10) ? ("0" + iHour24) : iHour24; + sHour = sHour24; + + iHour12 = oDTV.iCurrentHour; + if(iHour12 > 12) + iHour12 -= 12; + if(sHour === "00") + iHour12 = 12; + sHour12 = (iHour12 < 10) ? ("0" + iHour12) : iHour12; + if(oDTP.oData.bIs12Hour) + sHour = sHour12; + + sMinutes = oDTV.iCurrentMinutes; + sMinutes = (sMinutes < 10) ? ("0" + sMinutes) : sMinutes; + sSeconds = oDTV.iCurrentSeconds; + sSeconds = (sSeconds < 10) ? ("0" + sSeconds) : sSeconds; + + return { + "H": iHour24, + "HH": sHour24, + "h": iHour12, + "hh": sHour12, + "hour": sHour, + "m": oDTV.iCurrentMinutes, + "mm": sMinutes, + "s": oDTV.iCurrentSeconds, + "ss": sSeconds, + "ME": oDTV.sCurrentMeridiem + }; + }, + + _setButtons: function() + { + var oDTP = this; + $(oDTP.element).find(".dtpicker-compButton").removeClass("dtpicker-compButtonDisable").addClass("dtpicker-compButtonEnable"); + + var dTempDate; + if(oDTP.oData.dMaxValue !== null) + { + if(oDTP.oData.bTimeMode) + { + // Decrement Hour + if((oDTP.oData.iCurrentHour + 1) > oDTP.oData.dMaxValue.getHours() || ((oDTP.oData.iCurrentHour + 1) === oDTP.oData.dMaxValue.getHours() && oDTP.oData.iCurrentMinutes > oDTP.oData.dMaxValue.getMinutes())) + $(oDTP.element).find(".hour .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + + // Decrement Minutes + if(oDTP.oData.iCurrentHour >= oDTP.oData.dMaxValue.getHours() && (oDTP.oData.iCurrentMinutes + 1) > oDTP.oData.dMaxValue.getMinutes()) + $(oDTP.element).find(".minutes .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + } + else + { + // Increment Day + dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, (oDTP.oData.iCurrentDay + 1), oDTP.oData.iCurrentHour, oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0); + if(dTempDate.getTime() > oDTP.oData.dMaxValue.getTime()) + $(oDTP.element).find(".day .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + + // Increment Month + dTempDate = new Date(oDTP.oData.iCurrentYear, (oDTP.oData.iCurrentMonth + 1), oDTP.oData.iCurrentDay, oDTP.oData.iCurrentHour, oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0); + if(dTempDate.getTime() > oDTP.oData.dMaxValue.getTime()) + $(oDTP.element).find(".month .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + + // Increment Year + dTempDate = new Date((oDTP.oData.iCurrentYear + 1), oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, oDTP.oData.iCurrentHour, oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0); + if(dTempDate.getTime() > oDTP.oData.dMaxValue.getTime()) + $(oDTP.element).find(".year .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + + // Increment Hour + dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, (oDTP.oData.iCurrentHour + 1), oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0); + if(dTempDate.getTime() > oDTP.oData.dMaxValue.getTime()) + $(oDTP.element).find(".hour .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + + // Increment Minutes + dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, oDTP.oData.iCurrentHour, (oDTP.oData.iCurrentMinutes + 1), oDTP.oData.iCurrentSeconds, 0); + if(dTempDate.getTime() > oDTP.oData.dMaxValue.getTime()) + $(oDTP.element).find(".minutes .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + + // Increment Seconds + dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, oDTP.oData.iCurrentHour, oDTP.oData.iCurrentMinutes, (oDTP.oData.iCurrentSeconds + 1), 0); + if(dTempDate.getTime() > oDTP.oData.dMaxValue.getTime()) + $(oDTP.element).find(".seconds .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + } + } + + if(oDTP.oData.dMinValue !== null) + { + if(oDTP.oData.bTimeMode) + { + // Decrement Hour + if((oDTP.oData.iCurrentHour - 1) < oDTP.oData.dMinValue.getHours() || ((oDTP.oData.iCurrentHour - 1) === oDTP.oData.dMinValue.getHours() && oDTP.oData.iCurrentMinutes < oDTP.oData.dMinValue.getMinutes())) + $(oDTP.element).find(".hour .decrement").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + + // Decrement Minutes + if(oDTP.oData.iCurrentHour <= oDTP.oData.dMinValue.getHours() && (oDTP.oData.iCurrentMinutes - 1) < oDTP.oData.dMinValue.getMinutes()) + $(oDTP.element).find(".minutes .decrement").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + } + else + { + // Decrement Day + dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, (oDTP.oData.iCurrentDay - 1), oDTP.oData.iCurrentHour, oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0); + if(dTempDate.getTime() < oDTP.oData.dMinValue.getTime()) + $(oDTP.element).find(".day .decrement").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + + // Decrement Month + dTempDate = new Date(oDTP.oData.iCurrentYear, (oDTP.oData.iCurrentMonth - 1), oDTP.oData.iCurrentDay, oDTP.oData.iCurrentHour, oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0); + if(dTempDate.getTime() < oDTP.oData.dMinValue.getTime()) + $(oDTP.element).find(".month .decrement").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + + // Decrement Year + dTempDate = new Date((oDTP.oData.iCurrentYear - 1), oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, oDTP.oData.iCurrentHour, oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0); + if(dTempDate.getTime() < oDTP.oData.dMinValue.getTime()) + $(oDTP.element).find(".year .decrement").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + + // Decrement Hour + dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, (oDTP.oData.iCurrentHour - 1), oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0); + if(dTempDate.getTime() < oDTP.oData.dMinValue.getTime()) + $(oDTP.element).find(".hour .decrement").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + + // Decrement Minutes + dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, oDTP.oData.iCurrentHour, (oDTP.oData.iCurrentMinutes - 1), oDTP.oData.iCurrentSeconds, 0); + if(dTempDate.getTime() < oDTP.oData.dMinValue.getTime()) + $(oDTP.element).find(".minutes .decrement").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + + // Decrement Seconds + dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, oDTP.oData.iCurrentHour, oDTP.oData.iCurrentMinutes, (oDTP.oData.iCurrentSeconds - 1), 0); + if(dTempDate.getTime() < oDTP.oData.dMinValue.getTime()) + $(oDTP.element).find(".seconds .decrement").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + } + } + + if(oDTP.oData.bIs12Hour) + { + var iTempHour, iTempMinutes; + if(oDTP.oData.dMaxValue !== null || oDTP.oData.dMinValue !== null) + { + iTempHour = oDTP.oData.iCurrentHour; + if($.cf._compare(oDTP.oData.sCurrentMeridiem, "AM")) + iTempHour += 12; + else if($.cf._compare(oDTP.oData.sCurrentMeridiem, "PM")) + iTempHour -= 12; + + dTempDate = new Date(oDTP.oData.iCurrentYear, oDTP.oData.iCurrentMonth, oDTP.oData.iCurrentDay, iTempHour, oDTP.oData.iCurrentMinutes, oDTP.oData.iCurrentSeconds, 0); + + if(oDTP.oData.dMaxValue !== null) + { + if(oDTP.oData.bTimeMode) + { + iTempMinutes = oDTP.oData.iCurrentMinutes; + if(iTempHour > oDTP.oData.dMaxValue.getHours() || (iTempHour === oDTP.oData.dMaxValue.getHours() && iTempMinutes > oDTP.oData.dMaxValue.getMinutes())) + $(oDTP.element).find(".meridiem .dtpicker-compButton").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + } + else + { + if(dTempDate.getTime() > oDTP.oData.dMaxValue.getTime()) + $(oDTP.element).find(".meridiem .dtpicker-compButton").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + } + } + + if(oDTP.oData.dMinValue !== null) + { + if(oDTP.oData.bTimeMode) + { + iTempMinutes = oDTP.oData.iCurrentMinutes; + if(iTempHour < oDTP.oData.dMinValue.getHours() || (iTempHour === oDTP.oData.dMinValue.getHours() && iTempMinutes < oDTP.oData.dMinValue.getMinutes())) + $(oDTP.element).find(".meridiem .dtpicker-compButton").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + } + else + { + if(dTempDate.getTime() < oDTP.oData.dMinValue.getTime()) + $(oDTP.element).find(".meridiem .dtpicker-compButton").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"); + } + } + } + } + }, + + // Public Method + setIsPopup: function(bIsPopup) + { + var oDTP = this; + + if(!oDTP.settings.isInline) + { + oDTP.settings.isPopup = bIsPopup; + + if($(oDTP.element).css("display") !== "none") + oDTP._hidePicker(0); + + if(oDTP.settings.isPopup) + { + $(oDTP.element).addClass("dtpicker-mobile"); + + $(oDTP.element).css({position: "fixed", top: 0, left: 0, width: "100%", height: "100%"}); + } + else + { + $(oDTP.element).removeClass("dtpicker-mobile"); + + if(oDTP.oData.oInputElement !== null) + { + var iElemTop = $(oDTP.oData.oInputElement).offset().top + $(oDTP.oData.oInputElement).outerHeight(), + iElemLeft = $(oDTP.oData.oInputElement).offset().left, + iElemWidth = $(oDTP.oData.oInputElement).outerWidth(); + + $(oDTP.element).css({position: "absolute", top: iElemTop, left: iElemLeft, width: iElemWidth, height: "auto"}); + } + } + } + }, + + _compareDates: function(dDate1, dDate2) + { + dDate1 = new Date(dDate1.getDate(), dDate1.getMonth(), dDate1.getFullYear(), 0, 0, 0, 0); + var iDateDiff = (dDate1.getTime() - dDate2.getTime()) / 864E5; + return (iDateDiff === 0) ? iDateDiff: (iDateDiff/Math.abs(iDateDiff)); + }, + + _compareTime: function(dTime1, dTime2) + { + var iTimeMatch = 0; + if((dTime1.getHours() === dTime2.getHours()) && (dTime1.getMinutes() === dTime2.getMinutes())) + iTimeMatch = 1; // 1 = Exact Match + else + { + if(dTime1.getHours() < dTime2.getHours()) + iTimeMatch = 2; // time1 < time2 + else if(dTime1.getHours() > dTime2.getHours()) + iTimeMatch = 3; // time1 > time2 + else if(dTime1.getHours() === dTime2.getHours()) + { + if(dTime1.getMinutes() < dTime2.getMinutes()) + iTimeMatch = 2; // time1 < time2 + else if(dTime1.getMinutes() > dTime2.getMinutes()) + iTimeMatch = 3; // time1 > time2 + } + } + return iTimeMatch; + }, + + _compareDateTime: function(dDate1, dDate2) + { + var iDateTimeDiff = (dDate1.getTime() - dDate2.getTime()) / 6E4; + return (iDateTimeDiff === 0) ? iDateTimeDiff: (iDateTimeDiff/Math.abs(iDateTimeDiff)); + }, + + _determineMeridiemFromHourAndMinutes: function(iHour, iMinutes) + { + if(iHour > 12 || (iHour === 12 && iMinutes >= 0)) + { + return "PM"; + } + else + { + return "AM"; + } + }, + + // Public Method + setLanguage: function(sLanguage) + { + var oDTP = this; + + oDTP.settings = $.extend({}, $.DateTimePicker.defaults, $.DateTimePicker.i18n[sLanguage], oDTP.options); + oDTP.settings.language = sLanguage; + + oDTP._setDateFormatArray(); // Set DateFormatArray + oDTP._setTimeFormatArray(); // Set TimeFormatArray + oDTP._setDateTimeFormatArray(); // Set DateTimeFormatArray + + return oDTP; + } + + }; + +})); + diff --git a/dist/DateTimePicker.min.css b/dist/DateTimePicker.min.css index c70fc9b..6686c54 100644 --- a/dist/DateTimePicker.min.css +++ b/dist/DateTimePicker.min.css @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/DateTimePicker.min.js b/dist/DateTimePicker.min.js index c16c997..39a8810 100644 --- a/dist/DateTimePicker.min.js +++ b/dist/DateTimePicker.min.js @@ -2,12 +2,11 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker ----------------------------------------------------------------------------- */ -Object.keys||(Object.keys=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b}),$.DateTimePicker=$.DateTimePicker||{name:"DateTimePicker",i18n:{},defaults:{mode:"date",defaultDate:null,dateSeparator:"-",timeSeparator:":",timeMeridiemSeparator:" ",dateTimeSeparator:" ",monthYearSeparator:" ",dateTimeFormat:"dd-MM-yyyy HH:mm",dateFormat:"dd-MM-yyyy",timeFormat:"HH:mm",maxDate:null,minDate:null,maxTime:null,minTime:null,maxDateTime:null,minDateTime:null,shortDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],fullDayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],fullMonthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],labels:null,minuteInterval:1,roundOffMinutes:!0,secondsInterval:1,roundOffSeconds:!0,showHeader:!0,titleContentDate:"Set Date",titleContentTime:"Set Time",titleContentDateTime:"Set Date & Time",buttonsToDisplay:["HeaderCloseButton","SetButton","ClearButton"],setButtonContent:"Set",clearButtonContent:"Clear",incrementButtonContent:"+",decrementButtonContent:"-",setValueInTextboxOnEveryClick:!1,readonlyInputs:!1,animationDuration:400,touchHoldInterval:300,captureTouchHold:!1,mouseHoldInterval:50,captureMouseHold:!1,isPopup:!0,parentElement:"body",isInline:!1,inputElement:null,language:"",init:null,addEventHandlers:null,beforeShow:null,afterShow:null,beforeHide:null,afterHide:null,buttonClicked:null,settingValueOfElement:null,formatHumanDate:null,parseDateTimeString:null,formatDateTimeString:null},dataObject:{dCurrentDate:new Date,iCurrentDay:0,iCurrentMonth:0,iCurrentYear:0,iCurrentHour:0,iCurrentMinutes:0,iCurrentSeconds:0,sCurrentMeridiem:"",iMaxNumberOfDays:0,sDateFormat:"",sTimeFormat:"",sDateTimeFormat:"",dMinValue:null,dMaxValue:null,sArrInputDateFormats:[],sArrInputTimeFormats:[],sArrInputDateTimeFormats:[],bArrMatchFormat:[],bDateMode:!1,bTimeMode:!1,bDateTimeMode:!1,oInputElement:null,iTabIndex:0,bElemFocused:!1,bIs12Hour:!1,sTouchButton:null,iTouchStart:null,oTimeInterval:null,bIsTouchDevice:"ontouchstart"in document.documentElement}},$.cf={_isValid:function(a){return void 0!==a&&null!==a&&""!==a},_compare:function(a,b){var c=void 0!==a&&null!==a,d=void 0!==b&&null!==b;return!(!c||!d)&&a.toLowerCase()===b.toLowerCase()}},function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";function b(b,c){this.element=b;var d="";d=a.cf._isValid(c)&&a.cf._isValid(c.language)?c.language:a.DateTimePicker.defaults.language,this.settings=a.extend({},a.DateTimePicker.defaults,a.DateTimePicker.i18n[d],c),this.options=c,this.oData=a.extend({},a.DateTimePicker.dataObject),this._defaults=a.DateTimePicker.defaults,this._name=a.DateTimePicker.name,this.init()}a.fn.DateTimePicker=function(c){var d,e,f=a(this).data(),g=f?Object.keys(f):[];if("string"!=typeof c)return this.each(function(){a.removeData(this,"plugin_DateTimePicker"),a.data(this,"plugin_DateTimePicker")||a.data(this,"plugin_DateTimePicker",new b(this,c))});if(a.cf._isValid(f))if("destroy"===c){if(g.length>0)for(d in g)if(e=g[d],e.search("plugin_DateTimePicker")!==-1){a(document).unbind("click.DateTimePicker keydown.DateTimePicker keyup.DateTimePicker"),a(this).children().remove(),a(this).removeData(),a(this).unbind(),a(this).removeClass("dtpicker-overlay dtpicker-mobile dtpicker-inline"),f=f[e];break}}else if("object"===c&&g.length>0)for(d in g)if(e=g[d],e.search("plugin_DateTimePicker")!==-1)return f[e]},b.prototype={init:function(){var b=this;b._setDateFormatArray(),b._setTimeFormatArray(),b._setDateTimeFormatArray(),void 0!==a(b.element).data("parentelement")&&(b.settings.parentElement=a(b.element).data("parentelement")),b.settings.isPopup&&!b.settings.isInline&&(b._createPicker(),a(b.element).addClass("dtpicker-mobile")),b.settings.isInline&&(b._createPicker(),b._showPicker(b.settings.inputElement)),b.settings.init&&b.settings.init.call(b),b._addEventHandlersForInput()},_setDateFormatArray:function(){var a=this;a.oData.sArrInputDateFormats=[];var b="";b="dd"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"yyyy",a.oData.sArrInputDateFormats.push(b),b="MM"+a.settings.dateSeparator+"dd"+a.settings.dateSeparator+"yyyy",a.oData.sArrInputDateFormats.push(b),b="yyyy"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"dd",a.oData.sArrInputDateFormats.push(b),b="dd"+a.settings.dateSeparator+"MMM"+a.settings.dateSeparator+"yyyy",a.oData.sArrInputDateFormats.push(b),b="MM"+a.settings.monthYearSeparator+"yyyy",a.oData.sArrInputDateFormats.push(b),b="MMM"+a.settings.monthYearSeparator+"yyyy",a.oData.sArrInputDateFormats.push(b),b="MMMM"+a.settings.monthYearSeparator+"yyyy",a.oData.sArrInputDateFormats.push(b),b="yyyy"+a.settings.monthYearSeparator+"MM",a.oData.sArrInputDateFormats.push(b)},_setTimeFormatArray:function(){var a=this;a.oData.sArrInputTimeFormats=[];var b="";b="hh"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss"+a.settings.timeMeridiemSeparator+"AA",a.oData.sArrInputTimeFormats.push(b),b="HH"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss",a.oData.sArrInputTimeFormats.push(b),b="hh"+a.settings.timeSeparator+"mm"+a.settings.timeMeridiemSeparator+"AA",a.oData.sArrInputTimeFormats.push(b),b="HH"+a.settings.timeSeparator+"mm",a.oData.sArrInputTimeFormats.push(b)},_setDateTimeFormatArray:function(){var a=this;a.oData.sArrInputDateTimeFormats=[];var b="",c="",d="";b="dd"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"yyyy",c="HH"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="dd"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"yyyy",c="hh"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss"+a.settings.timeMeridiemSeparator+"AA",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="MM"+a.settings.dateSeparator+"dd"+a.settings.dateSeparator+"yyyy",c="HH"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="MM"+a.settings.dateSeparator+"dd"+a.settings.dateSeparator+"yyyy",c="hh"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss"+a.settings.timeMeridiemSeparator+"AA",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="yyyy"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"dd",c="HH"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="yyyy"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"dd",c="hh"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss"+a.settings.timeMeridiemSeparator+"AA",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="dd"+a.settings.dateSeparator+"MMM"+a.settings.dateSeparator+"yyyy",c="hh"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="dd"+a.settings.dateSeparator+"MMM"+a.settings.dateSeparator+"yyyy",c="hh"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss"+a.settings.timeMeridiemSeparator+"AA",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="dd"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"yyyy",c="HH"+a.settings.timeSeparator+"mm",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="dd"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"yyyy",c="hh"+a.settings.timeSeparator+"mm"+a.settings.timeMeridiemSeparator+"AA",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="MM"+a.settings.dateSeparator+"dd"+a.settings.dateSeparator+"yyyy",c="HH"+a.settings.timeSeparator+"mm",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="MM"+a.settings.dateSeparator+"dd"+a.settings.dateSeparator+"yyyy",c="hh"+a.settings.timeSeparator+"mm"+a.settings.timeMeridiemSeparator+"AA",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="yyyy"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"dd",c="HH"+a.settings.timeSeparator+"mm",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="yyyy"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"dd",c="hh"+a.settings.timeSeparator+"mm"+a.settings.timeMeridiemSeparator+"AA",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="dd"+a.settings.dateSeparator+"MMM"+a.settings.dateSeparator+"yyyy",c="hh"+a.settings.timeSeparator+"mm",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="dd"+a.settings.dateSeparator+"MMM"+a.settings.dateSeparator+"yyyy",c="hh"+a.settings.timeSeparator+"mm"+a.settings.timeMeridiemSeparator+"AA",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d)},_matchFormat:function(b,c){var d=this;d.oData.bArrMatchFormat=[],d.oData.bDateMode=!1,d.oData.bTimeMode=!1,d.oData.bDateTimeMode=!1;var e,f=[];for(b=a.cf._isValid(b)?b:d.settings.mode,a.cf._compare(b,"date")?(c=a.cf._isValid(c)?c:d.oData.sDateFormat,d.oData.bDateMode=!0,f=d.oData.sArrInputDateFormats):a.cf._compare(b,"time")?(c=a.cf._isValid(c)?c:d.oData.sTimeFormat,d.oData.bTimeMode=!0,f=d.oData.sArrInputTimeFormats):a.cf._compare(b,"datetime")&&(c=a.cf._isValid(c)?c:d.oData.sDateTimeFormat,d.oData.bDateTimeMode=!0,f=d.oData.sArrInputDateTimeFormats),e=0;e0&&d._matchFormat(b,c)},_createPicker:function(){var b=this;b.settings.isInline?a(b.element).addClass("dtpicker-inline"):(a(b.element).addClass("dtpicker-overlay"),a(".dtpicker-overlay").click(function(a){b._hidePicker("")}));var c="";c+="
",c+="
",c+="
",c+="
",c+="
",c+="
",c+="
",c+="
",a(b.element).html(c)},_addEventHandlersForInput:function(){var b=this;if(!b.settings.isInline){b.oData.oInputElement=null,a(b.settings.parentElement).find("input[type='date'], input[type='time'], input[type='datetime']").each(function(){a(this).attr("data-field",a(this).attr("type")),a(this).attr("type","text")});var c="[data-field='date'], [data-field='time'], [data-field='datetime']";a(b.settings.parentElement).off("focus",c,b._inputFieldFocus).on("focus",c,{obj:b},b._inputFieldFocus),a(b.settings.parentElement).off("click",c,b._inputFieldClick).on("click",c,{obj:b},b._inputFieldClick)}b.settings.addEventHandlers&&b.settings.addEventHandlers.call(b)},_inputFieldFocus:function(a){var b=a.data.obj;b.showDateTimePicker(this),b.oData.bMouseDown=!1},_inputFieldClick:function(b){var c=b.data.obj;a.cf._compare(a(this).prop("tagName"),"input")||c.showDateTimePicker(this),b.stopPropagation()},getDateObjectForInputField:function(b){var c=this;if(a.cf._isValid(b)){var d,e=c._getValueOfElement(b),f=a(b).data("field"),g="";return a.cf._isValid(f)||(f=c.settings.mode),c.settings.formatDateTimeString?d=c.settings.parseDateTimeString.call(c,e,f,g,a(b)):(g=a(b).data("format"),a.cf._isValid(g)||(a.cf._compare(f,"date")?g=c.settings.dateFormat:a.cf._compare(f,"time")?g=c.settings.timeFormat:a.cf._compare(f,"datetime")&&(g=c.settings.dateTimeFormat)),c._matchFormat(f,g),a.cf._compare(f,"date")?d=c._parseDate(e):a.cf._compare(f,"time")?d=c._parseTime(e):a.cf._compare(f,"datetime")&&(d=c._parseDateTime(e))),d}},setDateTimeStringInInputField:function(b,c){var d=this;c=c||d.oData.dCurrentDate;var e;a.cf._isValid(b)?(e=[],"string"==typeof b?e.push(b):"object"==typeof b&&(e=b)):e=a.cf._isValid(d.settings.parentElement)?a(d.settings.parentElement).find("[data-field='date'], [data-field='time'], [data-field='datetime']"):a("[data-field='date'], [data-field='time'], [data-field='datetime']"),e.each(function(){var b,e,f,g,h=this;b=a(h).data("field"),a.cf._isValid(b)||(b=d.settings.mode),e="Custom",f=!1,d.settings.formatDateTimeString||(e=a(h).data("format"),a.cf._isValid(e)||(a.cf._compare(b,"date")?e=d.settings.dateFormat:a.cf._compare(b,"time")?e=d.settings.timeFormat:a.cf._compare(b,"datetime")&&(e=d.settings.dateTimeFormat)),f=d.getIs12Hour(b,e)),g=d._setOutput(b,e,f,c,h),d._setValueOfElement(g,a(h))})},getDateTimeStringInFormat:function(a,b,c){var d=this;return d._setOutput(a,b,d.getIs12Hour(a,b),c)},showDateTimePicker:function(a){var b=this;null!==b.oData.oInputElement?b.settings.isInline||b._hidePicker(0,a):b._showPicker(a)},_setButtonAction:function(a){var b=this;null!==b.oData.oInputElement&&(b._setValueOfElement(b._setOutput()),a?(b.settings.buttonClicked&&b.settings.buttonClicked.call(b,"TAB",b.oData.oInputElement),b.settings.isInline||b._hidePicker(0)):b.settings.isInline||b._hidePicker(""))},_setOutput:function(b,c,d,e,f){var g=this;e=a.cf._isValid(e)?e:g.oData.dCurrentDate,d=d||g.oData.bIs12Hour;var h,i=g._setVariablesForDate(e,!0,!0),j="",k=g._formatDate(i),l=g._formatTime(i),m=a.extend({},k,l),n="",o="",p=Function.length;return g.settings.formatDateTimeString?j=g.settings.formatDateTimeString.call(g,m,b,c,f):(g._setMatchFormat(p,b,c),g.oData.bDateMode?g.oData.bArrMatchFormat[0]?j=m.dd+g.settings.dateSeparator+m.MM+g.settings.dateSeparator+m.yyyy:g.oData.bArrMatchFormat[1]?j=m.MM+g.settings.dateSeparator+m.dd+g.settings.dateSeparator+m.yyyy:g.oData.bArrMatchFormat[2]?j=m.yyyy+g.settings.dateSeparator+m.MM+g.settings.dateSeparator+m.dd:g.oData.bArrMatchFormat[3]?j=m.dd+g.settings.dateSeparator+m.monthShort+g.settings.dateSeparator+m.yyyy:g.oData.bArrMatchFormat[4]?j=m.MM+g.settings.monthYearSeparator+m.yyyy:g.oData.bArrMatchFormat[5]?j=m.monthShort+g.settings.monthYearSeparator+m.yyyy:g.oData.bArrMatchFormat[6]?j=m.month+g.settings.monthYearSeparator+m.yyyy:g.oData.bArrMatchFormat[7]&&(j=m.yyyy+g.settings.monthYearSeparator+m.MM):g.oData.bTimeMode?g.oData.bArrMatchFormat[0]?j=m.hh+g.settings.timeSeparator+m.mm+g.settings.timeSeparator+m.ss+g.settings.timeMeridiemSeparator+m.ME:g.oData.bArrMatchFormat[1]?j=m.HH+g.settings.timeSeparator+m.mm+g.settings.timeSeparator+m.ss:g.oData.bArrMatchFormat[2]?j=m.hh+g.settings.timeSeparator+m.mm+g.settings.timeMeridiemSeparator+m.ME:g.oData.bArrMatchFormat[3]&&(j=m.HH+g.settings.timeSeparator+m.mm):g.oData.bDateTimeMode&&(g.oData.bArrMatchFormat[0]||g.oData.bArrMatchFormat[1]||g.oData.bArrMatchFormat[8]||g.oData.bArrMatchFormat[9]?n=m.dd+g.settings.dateSeparator+m.MM+g.settings.dateSeparator+m.yyyy:g.oData.bArrMatchFormat[2]||g.oData.bArrMatchFormat[3]||g.oData.bArrMatchFormat[10]||g.oData.bArrMatchFormat[11]?n=m.MM+g.settings.dateSeparator+m.dd+g.settings.dateSeparator+m.yyyy:g.oData.bArrMatchFormat[4]||g.oData.bArrMatchFormat[5]||g.oData.bArrMatchFormat[12]||g.oData.bArrMatchFormat[13]?n=m.yyyy+g.settings.dateSeparator+m.MM+g.settings.dateSeparator+m.dd:(g.oData.bArrMatchFormat[6]||g.oData.bArrMatchFormat[7]||g.oData.bArrMatchFormat[14]||g.oData.bArrMatchFormat[15])&&(n=m.dd+g.settings.dateSeparator+m.monthShort+g.settings.dateSeparator+m.yyyy),h=g.oData.bArrMatchFormat[0]||g.oData.bArrMatchFormat[1]||g.oData.bArrMatchFormat[2]||g.oData.bArrMatchFormat[3]||g.oData.bArrMatchFormat[4]||g.oData.bArrMatchFormat[5]||g.oData.bArrMatchFormat[6]||g.oData.bArrMatchFormat[7],o=d?h?m.hh+g.settings.timeSeparator+m.mm+g.settings.timeSeparator+m.ss+g.settings.timeMeridiemSeparator+m.ME:m.hh+g.settings.timeSeparator+m.mm+g.settings.timeMeridiemSeparator+m.ME:h?m.HH+g.settings.timeSeparator+m.mm+g.settings.timeSeparator+m.ss:m.HH+g.settings.timeSeparator+m.mm,""!==n&&""!==o&&(j=n+g.settings.dateTimeSeparator+o)),g._setMatchFormat(p)),j},_clearButtonAction:function(){var a=this;null!==a.oData.oInputElement&&a._setValueOfElement(""),a.settings.isInline||a._hidePicker("")},_setOutputOnIncrementOrDecrement:function(){var b=this;a.cf._isValid(b.oData.oInputElement)&&b.settings.setValueInTextboxOnEveryClick&&b._setValueOfElement(b._setOutput())},_showPicker:function(b){var c=this;if(null===c.oData.oInputElement){c.oData.oInputElement=b,c.oData.iTabIndex=parseInt(a(b).attr("tabIndex"));var d=a(b).data("field")||"",e=a(b).data("min")||"",f=a(b).data("max")||"",g=a(b).data("format")||"",h=a(b).data("view")||"",i=a(b).data("startend")||"",j=a(b).data("startendelem")||"",k=c._getValueOfElement(b)||"";if(""!==h&&(a.cf._compare(h,"Popup")?c.setIsPopup(!0):c.setIsPopup(!1)),!c.settings.isPopup&&!c.settings.isInline){c._createPicker();var l=a(c.oData.oInputElement).offset().top+a(c.oData.oInputElement).outerHeight(),m=a(c.oData.oInputElement).offset().left,n=a(c.oData.oInputElement).outerWidth();a(c.element).css({position:"absolute",top:l,left:m,width:n,height:"auto"})}c.settings.beforeShow&&c.settings.beforeShow.call(c,b),d=a.cf._isValid(d)?d:c.settings.mode,c.settings.mode=d,a.cf._isValid(g)||(a.cf._compare(d,"date")?g=c.settings.dateFormat:a.cf._compare(d,"time")?g=c.settings.timeFormat:a.cf._compare(d,"datetime")&&(g=c.settings.dateTimeFormat)),c._matchFormat(d,g),c.oData.dMinValue=null,c.oData.dMaxValue=null,c.oData.bIs12Hour=!1;var o,p,q,r,s,t,u,v;c.oData.bDateMode?(o=e||c.settings.minDate,p=f||c.settings.maxDate,c.oData.sDateFormat=g,a.cf._isValid(o)&&(c.oData.dMinValue=c._parseDate(o)),a.cf._isValid(p)&&(c.oData.dMaxValue=c._parseDate(p)),""!==i&&(a.cf._compare(i,"start")||a.cf._compare(i,"end"))&&""!==j&&a(j).length>=1&&(q=c._getValueOfElement(a(j)),""!==q&&(r=c.settings.parseDateTimeString?c.settings.parseDateTimeString.call(c,q,d,g,a(j)):c._parseDate(q),a.cf._compare(i,"start")?a.cf._isValid(p)?c._compareDates(r,c.oData.dMaxValue)<0&&(c.oData.dMaxValue=new Date(r)):c.oData.dMaxValue=new Date(r):a.cf._compare(i,"end")&&(a.cf._isValid(o)?c._compareDates(r,c.oData.dMinValue)>0&&(c.oData.dMinValue=new Date(r)):c.oData.dMinValue=new Date(r)))),c.settings.parseDateTimeString?c.oData.dCurrentDate=c.settings.parseDateTimeString.call(c,k,d,g,a(b)):c.oData.dCurrentDate=c._parseDate(k),c.oData.dCurrentDate.setHours(0),c.oData.dCurrentDate.setMinutes(0),c.oData.dCurrentDate.setSeconds(0)):c.oData.bTimeMode?(o=e||c.settings.minTime,p=f||c.settings.maxTime,c.oData.sTimeFormat=g,c.oData.bIs12Hour=c.getIs12Hour(),a.cf._isValid(o)&&(c.oData.dMinValue=c._parseTime(o),a.cf._isValid(p)||(c.oData.sTimeFormat===c.oData.sArrInputTimeFormats[0]?p="11:59:59 PM":c.oData.sTimeFormat===c.oData.sArrInputTimeFormats[1]?p="23:59:59":c.oData.sTimeFormat===c.oData.sArrInputTimeFormats[2]?p="11:59 PM":c.oData.sTimeFormat===c.oData.sArrInputTimeFormats[3]&&(p="23:59"),c.oData.dMaxValue=c._parseTime(p))),a.cf._isValid(p)&&(c.oData.dMaxValue=c._parseTime(p),a.cf._isValid(o)||(c.oData.sTimeFormat===c.oData.sArrInputTimeFormats[0]?o="12:00:00 AM":c.oData.sTimeFormat===c.oData.sArrInputTimeFormats[1]?o="00:00:00":c.oData.sTimeFormat===c.oData.sArrInputTimeFormats[2]?o="12:00 AM":c.oData.sTimeFormat===c.oData.sArrInputTimeFormats[3]&&(o="00:00"),c.oData.dMinValue=c._parseTime(o))),""!==i&&(a.cf._compare(i,"start")||a.cf._compare(i,"end"))&&""!==j&&a(j).length>=1&&(s=c._getValueOfElement(a(j)),""!==s&&(c.settings.parseDateTimeString?r=c.settings.parseDateTimeString.call(c,s,d,g,a(j)):t=c._parseTime(s),a.cf._compare(i,"start")?(t.setMinutes(t.getMinutes()-1),a.cf._isValid(p)?2===c._compareTime(t,c.oData.dMaxValue)&&(c.oData.dMaxValue=new Date(t)):c.oData.dMaxValue=new Date(t)):a.cf._compare(i,"end")&&(t.setMinutes(t.getMinutes()+1),a.cf._isValid(o)?3===c._compareTime(t,c.oData.dMinValue)&&(c.oData.dMinValue=new Date(t)):c.oData.dMinValue=new Date(t)))),c.settings.parseDateTimeString?c.oData.dCurrentDate=c.settings.parseDateTimeString.call(c,k,d,g,a(b)):c.oData.dCurrentDate=c._parseTime(k)):c.oData.bDateTimeMode&&(o=e||c.settings.minDateTime,p=f||c.settings.maxDateTime,c.oData.sDateTimeFormat=g,c.oData.bIs12Hour=c.getIs12Hour(),a.cf._isValid(o)&&(c.oData.dMinValue=c._parseDateTime(o)),a.cf._isValid(p)&&(c.oData.dMaxValue=c._parseDateTime(p)),""!==i&&(a.cf._compare(i,"start")||a.cf._compare(i,"end"))&&""!==j&&a(j).length>=1&&(u=c._getValueOfElement(a(j)),""!==u&&(v=c.settings.parseDateTimeString?c.settings.parseDateTimeString.call(c,u,d,g,a(j)):c._parseDateTime(u),a.cf._compare(i,"start")?a.cf._isValid(p)?c._compareDateTime(v,c.oData.dMaxValue)<0&&(c.oData.dMaxValue=new Date(v)):c.oData.dMaxValue=new Date(v):a.cf._compare(i,"end")&&(a.cf._isValid(o)?c._compareDateTime(v,c.oData.dMinValue)>0&&(c.oData.dMinValue=new Date(v)):c.oData.dMinValue=new Date(v)))),c.settings.parseDateTimeString?c.oData.dCurrentDate=c.settings.parseDateTimeString.call(c,k,d,g,a(b)):c.oData.dCurrentDate=c._parseDateTime(k)),c._setVariablesForDate(),c._modifyPicker(),a(c.element).fadeIn(c.settings.animationDuration),c.settings.afterShow&&setTimeout(function(){c.settings.afterShow.call(c,b)},c.settings.animationDuration)}},_hidePicker:function(b,c){var d=this,e=d.oData.oInputElement;d.settings.beforeHide&&d.settings.beforeHide.call(d,e),a.cf._isValid(b)||(b=d.settings.animationDuration),a.cf._isValid(d.oData.oInputElement)&&(a(d.oData.oInputElement).blur(),d.oData.oInputElement=null),a(d.element).fadeOut(b),0===b?a(d.element).find(".dtpicker-subcontent").html(""):setTimeout(function(){a(d.element).find(".dtpicker-subcontent").html("")},b),a(document).unbind("click.DateTimePicker keydown.DateTimePicker keyup.DateTimePicker"),d.settings.afterHide&&(0===b?d.settings.afterHide.call(d,e):setTimeout(function(){d.settings.afterHide.call(d,e)},b)),a.cf._isValid(c)&&d._showPicker(c)},_modifyPicker:function(){var b,c,d=this,e=[];d.oData.bDateMode?(b=d.settings.titleContentDate,c=3,d.oData.bArrMatchFormat[0]?e=["day","month","year"]:d.oData.bArrMatchFormat[1]?e=["month","day","year"]:d.oData.bArrMatchFormat[2]?e=["year","month","day"]:d.oData.bArrMatchFormat[3]?e=["day","month","year"]:d.oData.bArrMatchFormat[4]?(c=2,e=["month","year"]):d.oData.bArrMatchFormat[5]?(c=2,e=["month","year"]):d.oData.bArrMatchFormat[6]?(c=2,e=["month","year"]):d.oData.bArrMatchFormat[7]&&(c=2,e=["year","month"])):d.oData.bTimeMode?(b=d.settings.titleContentTime,d.oData.bArrMatchFormat[0]?(c=4,e=["hour","minutes","seconds","meridiem"]):d.oData.bArrMatchFormat[1]?(c=3,e=["hour","minutes","seconds"]):d.oData.bArrMatchFormat[2]?(c=3,e=["hour","minutes","meridiem"]):d.oData.bArrMatchFormat[3]&&(c=2,e=["hour","minutes"])):d.oData.bDateTimeMode&&(b=d.settings.titleContentDateTime,d.oData.bArrMatchFormat[0]?(c=6,e=["day","month","year","hour","minutes","seconds"]):d.oData.bArrMatchFormat[1]?(c=7,e=["day","month","year","hour","minutes","seconds","meridiem"]):d.oData.bArrMatchFormat[2]?(c=6,e=["month","day","year","hour","minutes","seconds"]):d.oData.bArrMatchFormat[3]?(c=7,e=["month","day","year","hour","minutes","seconds","meridiem"]):d.oData.bArrMatchFormat[4]?(c=6,e=["year","month","day","hour","minutes","seconds"]):d.oData.bArrMatchFormat[5]?(c=7,e=["year","month","day","hour","minutes","seconds","meridiem"]):d.oData.bArrMatchFormat[6]?(c=6,e=["day","month","year","hour","minutes","seconds"]):d.oData.bArrMatchFormat[7]?(c=7,e=["day","month","year","hour","minutes","seconds","meridiem"]):d.oData.bArrMatchFormat[8]?(c=5,e=["day","month","year","hour","minutes"]):d.oData.bArrMatchFormat[9]?(c=6,e=["day","month","year","hour","minutes","meridiem"]):d.oData.bArrMatchFormat[10]?(c=5,e=["month","day","year","hour","minutes"]):d.oData.bArrMatchFormat[11]?(c=6,e=["month","day","year","hour","minutes","meridiem"]):d.oData.bArrMatchFormat[12]?(c=5,e=["year","month","day","hour","minutes"]):d.oData.bArrMatchFormat[13]?(c=6,e=["year","month","day","hour","minutes","meridiem"]):d.oData.bArrMatchFormat[14]?(c=5,e=["day","month","year","hour","minutes"]):d.oData.bArrMatchFormat[15]&&(c=6,e=["day","month","year","hour","minutes","meridiem"]));var f,g="dtpicker-comp"+c,h=!1,i=!1,j=!1;for(f=0;f",h&&(k+="×"),k+="
",k+="");var l="";for(l+="
",f=0;f",l+="
",l+=""+d.settings.incrementButtonContent+"",l+=d.settings.readonlyInputs?"":"",l+=""+d.settings.decrementButtonContent+"",d.settings.labels&&(l+="
"+d.settings.labels[m]+"
"),l+="
",l+="
"}l+="";var n="";n=i&&j?" dtpicker-twoButtons":" dtpicker-singleButton";var o="";o+="";var p=k+l+o;a(d.element).find(".dtpicker-subcontent").html(p),d._setCurrentDate(),d._addEventHandlersForPicker()},_addEventHandlersForPicker:function(){var b,c,d=this;if(d.settings.isInline||a(document).on("click.DateTimePicker",function(a){d._hidePicker("")}),a(document).on("keydown.DateTimePicker",function(e){if(c=parseInt(e.keyCode?e.keyCode:e.which),!a(".dtpicker-compValue").is(":focus")&&9===c)return d._setButtonAction(!0),a("[tabIndex="+(d.oData.iTabIndex+1)+"]").focus(),!1;if(a(".dtpicker-compValue").is(":focus")){if(38===c)return b=a(".dtpicker-compValue:focus").parent().attr("class"),d._incrementDecrementActionsUsingArrowAndMouse(b,"inc"),!1;if(40===c)return b=a(".dtpicker-compValue:focus").parent().attr("class"),d._incrementDecrementActionsUsingArrowAndMouse(b,"dec"),!1}}),d.settings.isInline||a(document).on("keydown.DateTimePicker",function(b){c=parseInt(b.keyCode?b.keyCode:b.which),a(".dtpicker-compValue").is(":focus")||9===c||d._hidePicker("")}),a(".dtpicker-cont *").click(function(a){a.stopPropagation()}),d.settings.readonlyInputs||(a(".dtpicker-compValue").not(".month .dtpicker-compValue, .meridiem .dtpicker-compValue").keyup(function(){this.value=this.value.replace(/[^0-9\.]/g,"")}),a(".dtpicker-compValue").focus(function(){d.oData.bElemFocused=!0,a(this).select()}),a(".dtpicker-compValue").blur(function(){d._getValuesFromInputBoxes(),d._setCurrentDate(),d.oData.bElemFocused=!1;var b=a(this).parent().parent();setTimeout(function(){b.is(":last-child")&&!d.oData.bElemFocused&&d._setButtonAction(!1)},50)}),a(".dtpicker-compValue").keyup(function(b){var c,d=a(this),e=d.val(),f=e.length;d.parent().hasClass("day")||d.parent().hasClass("hour")||d.parent().hasClass("minutes")||d.parent().hasClass("meridiem")?f>2&&(c=e.slice(0,2),d.val(c)):d.parent().hasClass("month")?f>3&&(c=e.slice(0,3),d.val(c)):d.parent().hasClass("year")&&f>4&&(c=e.slice(0,4),d.val(c)),9===parseInt(b.keyCode?b.keyCode:b.which)&&a(this).select()})),a(d.element).find(".dtpicker-compValue").on("mousewheel DOMMouseScroll onmousewheel",function(c){if(a(".dtpicker-compValue").is(":focus")){var e=Math.max(-1,Math.min(1,c.originalEvent.wheelDelta));return e>0?(b=a(".dtpicker-compValue:focus").parent().attr("class"),d._incrementDecrementActionsUsingArrowAndMouse(b,"inc")):(b=a(".dtpicker-compValue:focus").parent().attr("class"),d._incrementDecrementActionsUsingArrowAndMouse(b,"dec")),!1}}),a(d.element).find(".dtpicker-close").click(function(a){d.settings.buttonClicked&&d.settings.buttonClicked.call(d,"CLOSE",d.oData.oInputElement),d.settings.isInline||d._hidePicker("")}),a(d.element).find(".dtpicker-buttonSet").click(function(a){d.settings.buttonClicked&&d.settings.buttonClicked.call(d,"SET",d.oData.oInputElement),d._setButtonAction(!1)}),a(d.element).find(".dtpicker-buttonClear").click(function(a){d.settings.buttonClicked&&d.settings.buttonClicked.call(d,"CLEAR",d.oData.oInputElement),d._clearButtonAction()}),d.settings.captureTouchHold||d.settings.captureMouseHold){var e="";d.settings.captureTouchHold&&d.oData.bIsTouchDevice&&(e+="touchstart touchmove touchend "),d.settings.captureMouseHold&&(e+="mousedown mouseup"),a(".dtpicker-cont *").on(e,function(a){d._clearIntervalForTouchEvents()}),d._bindTouchEvents("day"),d._bindTouchEvents("month"),d._bindTouchEvents("year"),d._bindTouchEvents("hour"),d._bindTouchEvents("minutes"),d._bindTouchEvents("seconds")}else a(d.element).find(".day .increment, .day .increment *").click(function(a){d.oData.iCurrentDay++,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".day .decrement, .day .decrement *").click(function(a){d.oData.iCurrentDay--,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".month .increment, .month .increment *").click(function(a){d.oData.iCurrentMonth++,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".month .decrement, .month .decrement *").click(function(a){d.oData.iCurrentMonth--,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".year .increment, .year .increment *").click(function(a){d.oData.iCurrentYear++,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".year .decrement, .year .decrement *").click(function(a){d.oData.iCurrentYear--,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".hour .increment, .hour .increment *").click(function(a){d.oData.iCurrentHour++,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".hour .decrement, .hour .decrement *").click(function(a){d.oData.iCurrentHour--,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".minutes .increment, .minutes .increment *").click(function(a){d.oData.iCurrentMinutes+=d.settings.minuteInterval,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".minutes .decrement, .minutes .decrement *").click(function(a){d.oData.iCurrentMinutes-=d.settings.minuteInterval,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".seconds .increment, .seconds .increment *").click(function(a){d.oData.iCurrentSeconds+=d.settings.secondsInterval,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".seconds .decrement, .seconds .decrement *").click(function(a){d.oData.iCurrentSeconds-=d.settings.secondsInterval,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()});a(d.element).find(".meridiem .dtpicker-compButton, .meridiem .dtpicker-compButton *").click(function(b){a.cf._compare(d.oData.sCurrentMeridiem,"AM")?(d.oData.sCurrentMeridiem="PM",d.oData.iCurrentHour+=12):a.cf._compare(d.oData.sCurrentMeridiem,"PM")&&(d.oData.sCurrentMeridiem="AM",d.oData.iCurrentHour-=12),d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()})},_adjustMinutes:function(a){var b=this;return b.settings.roundOffMinutes&&1!==b.settings.minuteInterval&&(a=a%b.settings.minuteInterval?a-a%b.settings.minuteInterval+b.settings.minuteInterval:a),a},_adjustSeconds:function(a){var b=this;return b.settings.roundOffSeconds&&1!==b.settings.secondsInterval&&(a=a%b.settings.secondsInterval?a-a%b.settings.secondsInterval+b.settings.secondsInterval:a),a},_getValueOfElement:function(b){var c="";return c=a.cf._compare(a(b).prop("tagName"),"INPUT")?a(b).val():a(b).html()},_setValueOfElement:function(b,c){var d=this;a.cf._isValid(c)||(c=a(d.oData.oInputElement)),a.cf._compare(c.prop("tagName"),"INPUT")?c.val(b):c.html(b);var e=d.getDateObjectForInputField(c);return d.settings.settingValueOfElement&&d.settings.settingValueOfElement.call(d,b,e,c),c.change(),b},_bindTouchEvents:function(b){var c=this;a(c.element).find("."+b+" .increment, ."+b+" .increment *").on("touchstart mousedown",function(d){d.stopPropagation(),a.cf._isValid(c.oData.sTouchButton)||(c.oData.iTouchStart=(new Date).getTime(), -c.oData.sTouchButton=b+"-inc",c._setIntervalForTouchEvents())}),a(c.element).find("."+b+" .increment, ."+b+" .increment *").on("touchend mouseup",function(a){a.stopPropagation(),c._clearIntervalForTouchEvents()}),a(c.element).find("."+b+" .decrement, ."+b+" .decrement *").on("touchstart mousedown",function(d){d.stopPropagation(),a.cf._isValid(c.oData.sTouchButton)||(c.oData.iTouchStart=(new Date).getTime(),c.oData.sTouchButton=b+"-dec",c._setIntervalForTouchEvents())}),a(c.element).find("."+b+" .decrement, ."+b+" .decrement *").on("touchend mouseup",function(a){a.stopPropagation(),c._clearIntervalForTouchEvents()})},_setIntervalForTouchEvents:function(){var b=this,c=b.oData.bIsTouchDevice?b.settings.touchHoldInterval:b.settings.mouseHoldInterval;if(!a.cf._isValid(b.oData.oTimeInterval)){var d;b.oData.oTimeInterval=setInterval(function(){d=(new Date).getTime()-b.oData.iTouchStart,d>c&&a.cf._isValid(b.oData.sTouchButton)&&("day-inc"===b.oData.sTouchButton?b.oData.iCurrentDay++:"day-dec"===b.oData.sTouchButton?b.oData.iCurrentDay--:"month-inc"===b.oData.sTouchButton?b.oData.iCurrentMonth++:"month-dec"===b.oData.sTouchButton?b.oData.iCurrentMonth--:"year-inc"===b.oData.sTouchButton?b.oData.iCurrentYear++:"year-dec"===b.oData.sTouchButton?b.oData.iCurrentYear--:"hour-inc"===b.oData.sTouchButton?b.oData.iCurrentHour++:"hour-dec"===b.oData.sTouchButton?b.oData.iCurrentHour--:"minute-inc"===b.oData.sTouchButton?b.oData.iCurrentMinutes+=b.settings.minuteInterval:"minute-dec"===b.oData.sTouchButton?b.oData.iCurrentMinutes-=b.settings.minuteInterval:"second-inc"===b.oData.sTouchButton?b.oData.iCurrentSeconds+=b.settings.secondsInterval:"second-dec"===b.oData.sTouchButton&&(b.oData.iCurrentSeconds-=b.settings.secondsInterval),b._setCurrentDate(),b._setOutputOnIncrementOrDecrement(),b.oData.iTouchStart=(new Date).getTime())},c)}},_clearIntervalForTouchEvents:function(){var b=this;clearInterval(b.oData.oTimeInterval),a.cf._isValid(b.oData.sTouchButton)&&(b.oData.sTouchButton=null,b.oData.iTouchStart=0),b.oData.oTimeInterval=null},_incrementDecrementActionsUsingArrowAndMouse:function(a,b){var c=this;a.includes("day")?"inc"===b?c.oData.iCurrentDay++:"dec"===b&&c.oData.iCurrentDay--:a.includes("month")?"inc"===b?c.oData.iCurrentMonth++:"dec"===b&&c.oData.iCurrentMonth--:a.includes("year")?"inc"===b?c.oData.iCurrentYear++:"dec"===b&&c.oData.iCurrentYear--:a.includes("hour")?"inc"===b?c.oData.iCurrentHour++:"dec"===b&&c.oData.iCurrentHour--:a.includes("minutes")?"inc"===b?c.oData.iCurrentMinutes+=c.settings.minuteInterval:"dec"===b&&(c.oData.iCurrentMinutes-=c.settings.minuteInterval):a.includes("seconds")&&("inc"===b?c.oData.iCurrentSeconds+=c.settings.secondsInterval:"dec"===b&&(c.oData.iCurrentSeconds-=c.settings.secondsInterval)),c._setCurrentDate(),c._setOutputOnIncrementOrDecrement()},_parseDate:function(b){var c=this,d=c.settings.defaultDate?new Date(c.settings.defaultDate):new Date,e=d.getDate(),f=d.getMonth(),g=d.getFullYear();if(a.cf._isValid(b))if("string"==typeof b){var h;h=c.oData.bArrMatchFormat[4]||c.oData.bArrMatchFormat[5]||c.oData.bArrMatchFormat[6]?b.split(c.settings.monthYearSeparator):b.split(c.settings.dateSeparator),c.oData.bArrMatchFormat[0]?(e=parseInt(h[0]),f=parseInt(h[1]-1),g=parseInt(h[2])):c.oData.bArrMatchFormat[1]?(f=parseInt(h[0]-1),e=parseInt(h[1]),g=parseInt(h[2])):c.oData.bArrMatchFormat[2]?(g=parseInt(h[0]),f=parseInt(h[1]-1),e=parseInt(h[2])):c.oData.bArrMatchFormat[3]?(e=parseInt(h[0]),f=c._getShortMonthIndex(h[1]),g=parseInt(h[2])):c.oData.bArrMatchFormat[4]?(e=1,f=parseInt(h[0])-1,g=parseInt(h[1])):c.oData.bArrMatchFormat[5]?(e=1,f=c._getShortMonthIndex(h[0]),g=parseInt(h[1])):c.oData.bArrMatchFormat[6]?(e=1,f=c._getFullMonthIndex(h[0]),g=parseInt(h[1])):c.oData.bArrMatchFormat[7]&&(e=1,f=parseInt(h[1])-1,g=parseInt(h[0]))}else e=b.getDate(),f=b.getMonth(),g=b.getFullYear();return d=new Date(g,f,e,0,0,0,0)},_parseTime:function(b){var c,d,e,f=this,g=f.settings.defaultDate?new Date(f.settings.defaultDate):new Date,h=g.getDate(),i=g.getMonth(),j=g.getFullYear(),k=g.getHours(),l=g.getMinutes(),m=g.getSeconds(),n=f.oData.bArrMatchFormat[0]||f.oData.bArrMatchFormat[1];return m=n?f._adjustSeconds(m):0,a.cf._isValid(b)&&("string"==typeof b?(f.oData.bIs12Hour&&(c=b.split(f.settings.timeMeridiemSeparator),b=c[0],d=c[1],a.cf._compare(d,"AM")||a.cf._compare(d,"PM")||(d="")),e=b.split(f.settings.timeSeparator),k=parseInt(e[0]),l=parseInt(e[1]),n&&(m=parseInt(e[2]),m=f._adjustSeconds(m)),12===k&&a.cf._compare(d,"AM")?k=0:k<12&&a.cf._compare(d,"PM")&&(k+=12)):(k=b.getHours(),l=b.getMinutes(),n&&(m=b.getSeconds(),m=f._adjustSeconds(m)))),l=f._adjustMinutes(l),g=new Date(j,i,h,k,l,m,0)},_parseDateTime:function(b){var c,d,e,f,g,h=this,i=h.settings.defaultDate?new Date(h.settings.defaultDate):new Date,j=i.getDate(),k=i.getMonth(),l=i.getFullYear(),m=i.getHours(),n=i.getMinutes(),o=i.getSeconds(),p="",q=h.oData.bArrMatchFormat[0]||h.oData.bArrMatchFormat[1]||h.oData.bArrMatchFormat[2]||h.oData.bArrMatchFormat[3]||h.oData.bArrMatchFormat[4]||h.oData.bArrMatchFormat[5]||h.oData.bArrMatchFormat[6]||h.oData.bArrMatchFormat[7];return o=q?h._adjustSeconds(o):0,a.cf._isValid(b)&&("string"==typeof b?(c=b.split(h.settings.dateTimeSeparator),d=c[0].split(h.settings.dateSeparator),h.oData.bArrMatchFormat[0]||h.oData.bArrMatchFormat[1]||h.oData.bArrMatchFormat[8]||h.oData.bArrMatchFormat[9]?(j=parseInt(d[0]),k=parseInt(d[1]-1),l=parseInt(d[2])):h.oData.bArrMatchFormat[2]||h.oData.bArrMatchFormat[3]||h.oData.bArrMatchFormat[10]||h.oData.bArrMatchFormat[11]?(k=parseInt(d[0]-1),j=parseInt(d[1]),l=parseInt(d[2])):h.oData.bArrMatchFormat[4]||h.oData.bArrMatchFormat[5]||h.oData.bArrMatchFormat[12]||h.oData.bArrMatchFormat[13]?(l=parseInt(d[0]),k=parseInt(d[1]-1),j=parseInt(d[2])):(h.oData.bArrMatchFormat[6]||h.oData.bArrMatchFormat[7]||h.oData.bArrMatchFormat[14]||h.oData.bArrMatchFormat[15])&&(j=parseInt(d[0]),k=h._getShortMonthIndex(d[1]),l=parseInt(d[2])),e=c[1],a.cf._isValid(e)&&(h.oData.bIs12Hour&&(a.cf._compare(h.settings.dateTimeSeparator,h.settings.timeMeridiemSeparator)&&3===c.length?p=c[2]:(f=e.split(h.settings.timeMeridiemSeparator),e=f[0],p=f[1]),a.cf._compare(p,"AM")||a.cf._compare(p,"PM")||(p="")),g=e.split(h.settings.timeSeparator),m=parseInt(g[0]),n=parseInt(g[1]),q&&(o=parseInt(g[2])),12===m&&a.cf._compare(p,"AM")?m=0:m<12&&a.cf._compare(p,"PM")&&(m+=12))):(j=b.getDate(),k=b.getMonth(),l=b.getFullYear(),m=b.getHours(),n=b.getMinutes(),q&&(o=b.getSeconds(),o=h._adjustSeconds(o)))),n=h._adjustMinutes(n),i=new Date(l,k,j,m,n,o,0)},_getShortMonthIndex:function(b){for(var c=this,d=0;d1&&(c=c.charAt(0).toUpperCase()+c.slice(1)),d=b.settings.shortMonthNames.indexOf(c),d!==-1?b.oData.iCurrentMonth=parseInt(d):c.match("^[+|-]?[0-9]+$")&&(b.oData.iCurrentMonth=parseInt(c-1)),b.oData.iCurrentDay=parseInt(a(b.element).find(".day .dtpicker-compValue").val())||b.oData.iCurrentDay,b.oData.iCurrentYear=parseInt(a(b.element).find(".year .dtpicker-compValue").val())||b.oData.iCurrentYear}if(b.oData.bTimeMode||b.oData.bDateTimeMode){var e,f,g,h;e=parseInt(a(b.element).find(".hour .dtpicker-compValue").val()),f=b._adjustMinutes(parseInt(a(b.element).find(".minutes .dtpicker-compValue").val())),g=b._adjustMinutes(parseInt(a(b.element).find(".seconds .dtpicker-compValue").val())),b.oData.iCurrentHour=isNaN(e)?b.oData.iCurrentHour:e,b.oData.iCurrentMinutes=isNaN(f)?b.oData.iCurrentMinutes:f,b.oData.iCurrentSeconds=isNaN(g)?b.oData.iCurrentSeconds:g,b.oData.iCurrentSeconds>59&&(b.oData.iCurrentMinutes+=b.oData.iCurrentSeconds/60,b.oData.iCurrentSeconds=b.oData.iCurrentSeconds%60),b.oData.iCurrentMinutes>59&&(b.oData.iCurrentHour+=b.oData.iCurrentMinutes/60,b.oData.iCurrentMinutes=b.oData.iCurrentMinutes%60),b.oData.bIs12Hour?b.oData.iCurrentHour>12&&(b.oData.iCurrentHour=b.oData.iCurrentHour%12):b.oData.iCurrentHour>23&&(b.oData.iCurrentHour=b.oData.iCurrentHour%23),b.oData.bIs12Hour&&(h=a(b.element).find(".meridiem .dtpicker-compValue").val(),(a.cf._compare(h,"AM")||a.cf._compare(h,"PM"))&&(b.oData.sCurrentMeridiem=h),a.cf._compare(b.oData.sCurrentMeridiem,"PM")&&12!==b.oData.iCurrentHour&&b.oData.iCurrentHour<13&&(b.oData.iCurrentHour+=12),a.cf._compare(b.oData.sCurrentMeridiem,"AM")&&12===b.oData.iCurrentHour&&(b.oData.iCurrentHour=0))}},_setCurrentDate:function(){var b=this;(b.oData.bTimeMode||b.oData.bDateTimeMode)&&(b.oData.iCurrentSeconds>59?(b.oData.iCurrentMinutes+=b.oData.iCurrentSeconds/60,b.oData.iCurrentSeconds=b.oData.iCurrentSeconds%60):b.oData.iCurrentSeconds<0&&(b.oData.iCurrentMinutes-=b.settings.minuteInterval,b.oData.iCurrentSeconds+=60),b.oData.iCurrentMinutes=b._adjustMinutes(b.oData.iCurrentMinutes),b.oData.iCurrentSeconds=b._adjustSeconds(b.oData.iCurrentSeconds));var c,d,e,f,g,h,i,j=new Date(b.oData.iCurrentYear,b.oData.iCurrentMonth,b.oData.iCurrentDay,b.oData.iCurrentHour,b.oData.iCurrentMinutes,b.oData.iCurrentSeconds,0),k=!1,l=!1;if(null!==b.oData.dMaxValue&&(k=j.getTime()>b.oData.dMaxValue.getTime()),null!==b.oData.dMinValue&&(l=j.getTime()b.oData.dMaxValue.getTime()),null!==b.oData.dMinValue&&(n=b.oData.dCurrentDate.getTime()12&&(e-=12),"00"===g&&(e=12),f=e<10?"0"+e:e,j.oData.bIs12Hour&&(g=f),h=k.iCurrentMinutes,h=h<10?"0"+h:h,i=k.iCurrentSeconds,i=i<10?"0"+i:i,{H:c,HH:d,h:e,hh:f,hour:g,m:k.iCurrentMinutes,mm:h,s:k.iCurrentSeconds,ss:i,ME:k.sCurrentMeridiem}},_setButtons:function(){var b=this;a(b.element).find(".dtpicker-compButton").removeClass("dtpicker-compButtonDisable").addClass("dtpicker-compButtonEnable");var c;if(null!==b.oData.dMaxValue&&(b.oData.bTimeMode?((b.oData.iCurrentHour+1>b.oData.dMaxValue.getHours()||b.oData.iCurrentHour+1===b.oData.dMaxValue.getHours()&&b.oData.iCurrentMinutes>b.oData.dMaxValue.getMinutes())&&a(b.element).find(".hour .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"),b.oData.iCurrentHour>=b.oData.dMaxValue.getHours()&&b.oData.iCurrentMinutes+1>b.oData.dMaxValue.getMinutes()&&a(b.element).find(".minutes .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable")):(c=new Date(b.oData.iCurrentYear,b.oData.iCurrentMonth,b.oData.iCurrentDay+1,b.oData.iCurrentHour,b.oData.iCurrentMinutes,b.oData.iCurrentSeconds,0),c.getTime()>b.oData.dMaxValue.getTime()&&a(b.element).find(".day .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"),c=new Date(b.oData.iCurrentYear,b.oData.iCurrentMonth+1,b.oData.iCurrentDay,b.oData.iCurrentHour,b.oData.iCurrentMinutes,b.oData.iCurrentSeconds,0),c.getTime()>b.oData.dMaxValue.getTime()&&a(b.element).find(".month .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"),c=new Date(b.oData.iCurrentYear+1,b.oData.iCurrentMonth,b.oData.iCurrentDay,b.oData.iCurrentHour,b.oData.iCurrentMinutes,b.oData.iCurrentSeconds,0),c.getTime()>b.oData.dMaxValue.getTime()&&a(b.element).find(".year .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"),c=new Date(b.oData.iCurrentYear,b.oData.iCurrentMonth,b.oData.iCurrentDay,b.oData.iCurrentHour+1,b.oData.iCurrentMinutes,b.oData.iCurrentSeconds,0),c.getTime()>b.oData.dMaxValue.getTime()&&a(b.element).find(".hour .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"),c=new Date(b.oData.iCurrentYear,b.oData.iCurrentMonth,b.oData.iCurrentDay,b.oData.iCurrentHour,b.oData.iCurrentMinutes+1,b.oData.iCurrentSeconds,0),c.getTime()>b.oData.dMaxValue.getTime()&&a(b.element).find(".minutes .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"),c=new Date(b.oData.iCurrentYear,b.oData.iCurrentMonth,b.oData.iCurrentDay,b.oData.iCurrentHour,b.oData.iCurrentMinutes,b.oData.iCurrentSeconds+1,0),c.getTime()>b.oData.dMaxValue.getTime()&&a(b.element).find(".seconds .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"))),null!==b.oData.dMinValue&&(b.oData.bTimeMode?((b.oData.iCurrentHour-1b.oData.dMaxValue.getHours()||d===b.oData.dMaxValue.getHours()&&e>b.oData.dMaxValue.getMinutes())&&a(b.element).find(".meridiem .dtpicker-compButton").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable")):c.getTime()>b.oData.dMaxValue.getTime()&&a(b.element).find(".meridiem .dtpicker-compButton").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable")),null!==b.oData.dMinValue&&(b.oData.bTimeMode?(e=b.oData.iCurrentMinutes,(db.getHours()?c=3:a.getHours()===b.getHours()&&(a.getMinutes()b.getMinutes()&&(c=3)),c},_compareDateTime:function(a,b){var c=(a.getTime()-b.getTime())/6e4;return 0===c?c:c/Math.abs(c)},_determineMeridiemFromHourAndMinutes:function(a,b){return a>12||12===a&&b>=0?"PM":"AM"},setLanguage:function(b){var c=this;return c.settings=a.extend({},a.DateTimePicker.defaults,a.DateTimePicker.i18n[b],c.options),c.settings.language=b,c._setDateFormatArray(),c._setTimeFormatArray(),c._setDateTimeFormatArray(),c}}}); \ No newline at end of file +Object.keys||(Object.keys=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b}),$.DateTimePicker=$.DateTimePicker||{name:"DateTimePicker",i18n:{},defaults:{mode:"date",defaultDate:null,dateSeparator:"-",timeSeparator:":",timeMeridiemSeparator:" ",dateTimeSeparator:" ",monthYearSeparator:" ",dateTimeFormat:"dd-MM-yyyy HH:mm",dateFormat:"dd-MM-yyyy",timeFormat:"HH:mm",maxDate:null,minDate:null,maxTime:null,minTime:null,maxDateTime:null,minDateTime:null,shortDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],fullDayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],fullMonthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],labels:null,minuteInterval:1,roundOffMinutes:!0,secondsInterval:1,roundOffSeconds:!0,showHeader:!0,titleContentDate:"Set Date",titleContentTime:"Set Time",titleContentDateTime:"Set Date & Time",buttonsToDisplay:["HeaderCloseButton","SetButton","ClearButton"],setButtonContent:"Set",clearButtonContent:"Clear",incrementButtonContent:"+",decrementButtonContent:"-",setValueInTextboxOnEveryClick:!1,readonlyInputs:!1,animationDuration:400,touchHoldInterval:300,captureTouchHold:!1,mouseHoldInterval:50,captureMouseHold:!1,isPopup:!0,parentElement:"body",isInline:!1,inputElement:null,language:"",init:null,addEventHandlers:null,beforeShow:null,afterShow:null,beforeHide:null,afterHide:null,buttonClicked:null,settingValueOfElement:null,formatHumanDate:null,parseDateTimeString:null,formatDateTimeString:null},dataObject:{dCurrentDate:new Date,iCurrentDay:0,iCurrentMonth:0,iCurrentYear:0,iCurrentHour:0,iCurrentMinutes:0,iCurrentSeconds:0,sCurrentMeridiem:"",iMaxNumberOfDays:0,sDateFormat:"",sTimeFormat:"",sDateTimeFormat:"",dMinValue:null,dMaxValue:null,sArrInputDateFormats:[],sArrInputTimeFormats:[],sArrInputDateTimeFormats:[],bArrMatchFormat:[],bDateMode:!1,bTimeMode:!1,bDateTimeMode:!1,oInputElement:null,iTabIndex:0,bElemFocused:!1,bIs12Hour:!1,sTouchButton:null,iTouchStart:null,oTimeInterval:null,bIsTouchDevice:"ontouchstart"in document.documentElement}},$.cf={_isValid:function(a){return void 0!==a&&null!==a&&""!==a},_compare:function(a,b){var c=void 0!==a&&null!==a,d=void 0!==b&&null!==b;return!(!c||!d)&&a.toLowerCase()===b.toLowerCase()}},function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";function b(b,c){this.element=b;var d="";d=a.cf._isValid(c)&&a.cf._isValid(c.language)?c.language:a.DateTimePicker.defaults.language,this.settings=a.extend({},a.DateTimePicker.defaults,a.DateTimePicker.i18n[d],c),this.options=c,this.oData=a.extend({},a.DateTimePicker.dataObject),this._defaults=a.DateTimePicker.defaults,this._name=a.DateTimePicker.name,this.init()}a.fn.DateTimePicker=function(c){var d,e,f=a(this).data(),g=f?Object.keys(f):[];if("string"!=typeof c)return this.each(function(){a.removeData(this,"plugin_DateTimePicker"),a.data(this,"plugin_DateTimePicker")||a.data(this,"plugin_DateTimePicker",new b(this,c))});if(a.cf._isValid(f))if("destroy"===c){if(g.length>0)for(d in g)if(e=g[d],-1!==e.search("plugin_DateTimePicker")){a(document).unbind("click.DateTimePicker keydown.DateTimePicker keyup.DateTimePicker"),a(this).children().remove(),a(this).removeData(),a(this).unbind(),a(this).removeClass("dtpicker-overlay dtpicker-mobile dtpicker-inline"),f=f[e];break}}else if("object"===c&&g.length>0)for(d in g)if(e=g[d],-1!==e.search("plugin_DateTimePicker"))return f[e]},b.prototype={init:function(){var b=this;b._setDateFormatArray(),b._setTimeFormatArray(),b._setDateTimeFormatArray(),void 0!==a(b.element).data("parentelement")&&(b.settings.parentElement=a(b.element).data("parentelement")),b.settings.isPopup&&!b.settings.isInline&&(b._createPicker(),a(b.element).addClass("dtpicker-mobile")),b.settings.isInline&&(b._createPicker(),b._showPicker(b.settings.inputElement)),b.settings.init&&b.settings.init.call(b),b._addEventHandlersForInput()},_setDateFormatArray:function(){var a=this;a.oData.sArrInputDateFormats=[];var b="";b="dd"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"yyyy",a.oData.sArrInputDateFormats.push(b),b="MM"+a.settings.dateSeparator+"dd"+a.settings.dateSeparator+"yyyy",a.oData.sArrInputDateFormats.push(b),b="yyyy"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"dd",a.oData.sArrInputDateFormats.push(b),b="dd"+a.settings.dateSeparator+"MMM"+a.settings.dateSeparator+"yyyy",a.oData.sArrInputDateFormats.push(b),b="MM"+a.settings.monthYearSeparator+"yyyy",a.oData.sArrInputDateFormats.push(b),b="MMM"+a.settings.monthYearSeparator+"yyyy",a.oData.sArrInputDateFormats.push(b),b="MMMM"+a.settings.monthYearSeparator+"yyyy",a.oData.sArrInputDateFormats.push(b),b="yyyy"+a.settings.monthYearSeparator+"MM",a.oData.sArrInputDateFormats.push(b)},_setTimeFormatArray:function(){var a=this;a.oData.sArrInputTimeFormats=[];var b="";b="hh"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss"+a.settings.timeMeridiemSeparator+"AA",a.oData.sArrInputTimeFormats.push(b),b="HH"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss",a.oData.sArrInputTimeFormats.push(b),b="hh"+a.settings.timeSeparator+"mm"+a.settings.timeMeridiemSeparator+"AA",a.oData.sArrInputTimeFormats.push(b),b="HH"+a.settings.timeSeparator+"mm",a.oData.sArrInputTimeFormats.push(b)},_setDateTimeFormatArray:function(){var a=this;a.oData.sArrInputDateTimeFormats=[];var b="",c="",d="";b="dd"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"yyyy",c="HH"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="dd"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"yyyy",c="hh"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss"+a.settings.timeMeridiemSeparator+"AA",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="MM"+a.settings.dateSeparator+"dd"+a.settings.dateSeparator+"yyyy",c="HH"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="MM"+a.settings.dateSeparator+"dd"+a.settings.dateSeparator+"yyyy",c="hh"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss"+a.settings.timeMeridiemSeparator+"AA",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="yyyy"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"dd",c="HH"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="yyyy"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"dd",c="hh"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss"+a.settings.timeMeridiemSeparator+"AA",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="dd"+a.settings.dateSeparator+"MMM"+a.settings.dateSeparator+"yyyy",c="hh"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="dd"+a.settings.dateSeparator+"MMM"+a.settings.dateSeparator+"yyyy",c="hh"+a.settings.timeSeparator+"mm"+a.settings.timeSeparator+"ss"+a.settings.timeMeridiemSeparator+"AA",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="dd"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"yyyy",c="HH"+a.settings.timeSeparator+"mm",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="dd"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"yyyy",c="hh"+a.settings.timeSeparator+"mm"+a.settings.timeMeridiemSeparator+"AA",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="MM"+a.settings.dateSeparator+"dd"+a.settings.dateSeparator+"yyyy",c="HH"+a.settings.timeSeparator+"mm",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="MM"+a.settings.dateSeparator+"dd"+a.settings.dateSeparator+"yyyy",c="hh"+a.settings.timeSeparator+"mm"+a.settings.timeMeridiemSeparator+"AA",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="yyyy"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"dd",c="HH"+a.settings.timeSeparator+"mm",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="yyyy"+a.settings.dateSeparator+"MM"+a.settings.dateSeparator+"dd",c="hh"+a.settings.timeSeparator+"mm"+a.settings.timeMeridiemSeparator+"AA",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="dd"+a.settings.dateSeparator+"MMM"+a.settings.dateSeparator+"yyyy",c="hh"+a.settings.timeSeparator+"mm",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d),b="dd"+a.settings.dateSeparator+"MMM"+a.settings.dateSeparator+"yyyy",c="hh"+a.settings.timeSeparator+"mm"+a.settings.timeMeridiemSeparator+"AA",d=b+a.settings.dateTimeSeparator+c,a.oData.sArrInputDateTimeFormats.push(d)},_matchFormat:function(b,c){var d=this;d.oData.bArrMatchFormat=[],d.oData.bDateMode=!1,d.oData.bTimeMode=!1,d.oData.bDateTimeMode=!1;var e,f=[];for(b=a.cf._isValid(b)?b:d.settings.mode,a.cf._compare(b,"date")?(c=a.cf._isValid(c)?c:d.oData.sDateFormat,d.oData.bDateMode=!0,f=d.oData.sArrInputDateFormats):a.cf._compare(b,"time")?(c=a.cf._isValid(c)?c:d.oData.sTimeFormat,d.oData.bTimeMode=!0,f=d.oData.sArrInputTimeFormats):a.cf._compare(b,"datetime")&&(c=a.cf._isValid(c)?c:d.oData.sDateTimeFormat,d.oData.bDateTimeMode=!0,f=d.oData.sArrInputDateTimeFormats),e=0;e0&&d._matchFormat(b,c)},_createPicker:function(){var b=this;b.settings.isInline?a(b.element).addClass("dtpicker-inline"):(a(b.element).addClass("dtpicker-overlay"),a(".dtpicker-overlay").click(function(a){b._hidePicker("")}));var c="";c+="
",c+="
",c+="
",c+="
",c+="
",c+="
",c+="
",c+="
",a(b.element).html(c)},_addEventHandlersForInput:function(){var b=this;if(!b.settings.isInline){b.oData.oInputElement=null,a(b.settings.parentElement).find("input[type='date'], input[type='time'], input[type='datetime']").each(function(){a(this).attr("data-field",a(this).attr("type")),a(this).attr("type","text")});var c="[data-field='date'], [data-field='time'], [data-field='datetime']";a(b.settings.parentElement).off("focus",c,b._inputFieldFocus).on("focus",c,{obj:b},b._inputFieldFocus),a(b.settings.parentElement).off("click",c,b._inputFieldClick).on("click",c,{obj:b},b._inputFieldClick)}b.settings.addEventHandlers&&b.settings.addEventHandlers.call(b)},_inputFieldFocus:function(a){var b=a.data.obj;b.showDateTimePicker(this),b.oData.bMouseDown=!1},_inputFieldClick:function(b){var c=b.data.obj;a.cf._compare(a(this).prop("tagName"),"input")||c.showDateTimePicker(this),b.stopPropagation()},getDateObjectForInputField:function(b){var c=this;if(a.cf._isValid(b)){var d,e=c._getValueOfElement(b),f=a(b).data("field"),g="";return a.cf._isValid(f)||(f=c.settings.mode),c.settings.formatDateTimeString?d=c.settings.parseDateTimeString.call(c,e,f,g,a(b)):(g=a(b).data("format"),a.cf._isValid(g)||(a.cf._compare(f,"date")?g=c.settings.dateFormat:a.cf._compare(f,"time")?g=c.settings.timeFormat:a.cf._compare(f,"datetime")&&(g=c.settings.dateTimeFormat)),c._matchFormat(f,g),a.cf._compare(f,"date")?d=c._parseDate(e):a.cf._compare(f,"time")?d=c._parseTime(e):a.cf._compare(f,"datetime")&&(d=c._parseDateTime(e))),d}},setDateTimeStringInInputField:function(b,c){var d=this;c=c||d.oData.dCurrentDate;var e;a.cf._isValid(b)?(e=[],"string"==typeof b?e.push(b):"object"==typeof b&&(e=b)):e=a.cf._isValid(d.settings.parentElement)?a(d.settings.parentElement).find("[data-field='date'], [data-field='time'], [data-field='datetime']"):a("[data-field='date'], [data-field='time'], [data-field='datetime']"),e.each(function(){var b,e,f,g,h=this;b=a(h).data("field"),a.cf._isValid(b)||(b=d.settings.mode),e="Custom",f=!1,d.settings.formatDateTimeString||(e=a(h).data("format"),a.cf._isValid(e)||(a.cf._compare(b,"date")?e=d.settings.dateFormat:a.cf._compare(b,"time")?e=d.settings.timeFormat:a.cf._compare(b,"datetime")&&(e=d.settings.dateTimeFormat)),f=d.getIs12Hour(b,e)),g=d._setOutput(b,e,f,c,h),d._setValueOfElement(g,a(h))})},getDateTimeStringInFormat:function(a,b,c){var d=this;return d._setOutput(a,b,d.getIs12Hour(a,b),c)},showDateTimePicker:function(a){var b=this;null!==b.oData.oInputElement?b.settings.isInline||b._hidePicker(0,a):b._showPicker(a)},_setButtonAction:function(a){var b=this;null!==b.oData.oInputElement&&(b._setValueOfElement(b._setOutput()),a?(b.settings.buttonClicked&&b.settings.buttonClicked.call(b,"TAB",b.oData.oInputElement),b.settings.isInline||b._hidePicker(0)):b.settings.isInline||b._hidePicker(""))},_setOutput:function(b,c,d,e,f){var g=this;e=a.cf._isValid(e)?e:g.oData.dCurrentDate,d=d||g.oData.bIs12Hour;var h,i=g._setVariablesForDate(e,!0,!0),j="",k=g._formatDate(i),l=g._formatTime(i),m=a.extend({},k,l),n="",o="",p=Function.length;return g.settings.formatDateTimeString?j=g.settings.formatDateTimeString.call(g,m,b,c,f):(g._setMatchFormat(p,b,c),g.oData.bDateMode?g.oData.bArrMatchFormat[0]?j=m.dd+g.settings.dateSeparator+m.MM+g.settings.dateSeparator+m.yyyy:g.oData.bArrMatchFormat[1]?j=m.MM+g.settings.dateSeparator+m.dd+g.settings.dateSeparator+m.yyyy:g.oData.bArrMatchFormat[2]?j=m.yyyy+g.settings.dateSeparator+m.MM+g.settings.dateSeparator+m.dd:g.oData.bArrMatchFormat[3]?j=m.dd+g.settings.dateSeparator+m.monthShort+g.settings.dateSeparator+m.yyyy:g.oData.bArrMatchFormat[4]?j=m.MM+g.settings.monthYearSeparator+m.yyyy:g.oData.bArrMatchFormat[5]?j=m.monthShort+g.settings.monthYearSeparator+m.yyyy:g.oData.bArrMatchFormat[6]?j=m.month+g.settings.monthYearSeparator+m.yyyy:g.oData.bArrMatchFormat[7]&&(j=m.yyyy+g.settings.monthYearSeparator+m.MM):g.oData.bTimeMode?g.oData.bArrMatchFormat[0]?j=m.hh+g.settings.timeSeparator+m.mm+g.settings.timeSeparator+m.ss+g.settings.timeMeridiemSeparator+m.ME:g.oData.bArrMatchFormat[1]?j=m.HH+g.settings.timeSeparator+m.mm+g.settings.timeSeparator+m.ss:g.oData.bArrMatchFormat[2]?j=m.hh+g.settings.timeSeparator+m.mm+g.settings.timeMeridiemSeparator+m.ME:g.oData.bArrMatchFormat[3]&&(j=m.HH+g.settings.timeSeparator+m.mm):g.oData.bDateTimeMode&&(g.oData.bArrMatchFormat[0]||g.oData.bArrMatchFormat[1]||g.oData.bArrMatchFormat[8]||g.oData.bArrMatchFormat[9]?n=m.dd+g.settings.dateSeparator+m.MM+g.settings.dateSeparator+m.yyyy:g.oData.bArrMatchFormat[2]||g.oData.bArrMatchFormat[3]||g.oData.bArrMatchFormat[10]||g.oData.bArrMatchFormat[11]?n=m.MM+g.settings.dateSeparator+m.dd+g.settings.dateSeparator+m.yyyy:g.oData.bArrMatchFormat[4]||g.oData.bArrMatchFormat[5]||g.oData.bArrMatchFormat[12]||g.oData.bArrMatchFormat[13]?n=m.yyyy+g.settings.dateSeparator+m.MM+g.settings.dateSeparator+m.dd:(g.oData.bArrMatchFormat[6]||g.oData.bArrMatchFormat[7]||g.oData.bArrMatchFormat[14]||g.oData.bArrMatchFormat[15])&&(n=m.dd+g.settings.dateSeparator+m.monthShort+g.settings.dateSeparator+m.yyyy),h=g.oData.bArrMatchFormat[0]||g.oData.bArrMatchFormat[1]||g.oData.bArrMatchFormat[2]||g.oData.bArrMatchFormat[3]||g.oData.bArrMatchFormat[4]||g.oData.bArrMatchFormat[5]||g.oData.bArrMatchFormat[6]||g.oData.bArrMatchFormat[7],o=d?h?m.hh+g.settings.timeSeparator+m.mm+g.settings.timeSeparator+m.ss+g.settings.timeMeridiemSeparator+m.ME:m.hh+g.settings.timeSeparator+m.mm+g.settings.timeMeridiemSeparator+m.ME:h?m.HH+g.settings.timeSeparator+m.mm+g.settings.timeSeparator+m.ss:m.HH+g.settings.timeSeparator+m.mm,""!==n&&""!==o&&(j=n+g.settings.dateTimeSeparator+o)),g._setMatchFormat(p)),j},_clearButtonAction:function(){var a=this;null!==a.oData.oInputElement&&a._setValueOfElement(""),a.settings.isInline||a._hidePicker("")},_setOutputOnIncrementOrDecrement:function(){var b=this;a.cf._isValid(b.oData.oInputElement)&&b.settings.setValueInTextboxOnEveryClick&&b._setValueOfElement(b._setOutput())},_showPicker:function(b){var c=this;if(null===c.oData.oInputElement){c.oData.oInputElement=b,c.oData.iTabIndex=parseInt(a(b).attr("tabIndex"));var d=a(b).data("field")||"",e=a(b).data("min")||"",f=a(b).data("max")||"",g=a(b).data("format")||"",h=a(b).data("view")||"",i=a(b).data("startend")||"",j=a(b).data("startendelem")||"",k=c._getValueOfElement(b)||"";if(""!==h&&(a.cf._compare(h,"Popup")?c.setIsPopup(!0):c.setIsPopup(!1)),!c.settings.isPopup&&!c.settings.isInline){c._createPicker();var l=a(c.oData.oInputElement).offset().top+a(c.oData.oInputElement).outerHeight(),m=a(c.oData.oInputElement).offset().left,n=a(c.oData.oInputElement).outerWidth();a(c.element).css({position:"absolute",top:l,left:m,width:n,height:"auto"})}c.settings.beforeShow&&c.settings.beforeShow.call(c,b),d=a.cf._isValid(d)?d:c.settings.mode,c.settings.mode=d,a.cf._isValid(g)||(a.cf._compare(d,"date")?g=c.settings.dateFormat:a.cf._compare(d,"time")?g=c.settings.timeFormat:a.cf._compare(d,"datetime")&&(g=c.settings.dateTimeFormat)),c._matchFormat(d,g),c.oData.dMinValue=null,c.oData.dMaxValue=null,c.oData.bIs12Hour=!1;var o,p,q,r,s,t,u,v;c.oData.bDateMode?(o=e||c.settings.minDate,p=f||c.settings.maxDate,c.oData.sDateFormat=g,a.cf._isValid(o)&&(c.oData.dMinValue=c._parseDate(o)),a.cf._isValid(p)&&(c.oData.dMaxValue=c._parseDate(p)),""!==i&&(a.cf._compare(i,"start")||a.cf._compare(i,"end"))&&""!==j&&a(j).length>=1&&""!==(q=c._getValueOfElement(a(j)))&&(r=c.settings.parseDateTimeString?c.settings.parseDateTimeString.call(c,q,d,g,a(j)):c._parseDate(q),a.cf._compare(i,"start")?a.cf._isValid(p)?c._compareDates(r,c.oData.dMaxValue)<0&&(c.oData.dMaxValue=new Date(r)):c.oData.dMaxValue=new Date(r):a.cf._compare(i,"end")&&(a.cf._isValid(o)?c._compareDates(r,c.oData.dMinValue)>0&&(c.oData.dMinValue=new Date(r)):c.oData.dMinValue=new Date(r))),c.settings.parseDateTimeString?c.oData.dCurrentDate=c.settings.parseDateTimeString.call(c,k,d,g,a(b)):c.oData.dCurrentDate=c._parseDate(k),c.oData.dCurrentDate.setHours(0),c.oData.dCurrentDate.setMinutes(0),c.oData.dCurrentDate.setSeconds(0)):c.oData.bTimeMode?(o=e||c.settings.minTime,p=f||c.settings.maxTime,c.oData.sTimeFormat=g,c.oData.bIs12Hour=c.getIs12Hour(),a.cf._isValid(o)&&(c.oData.dMinValue=c._parseTime(o),a.cf._isValid(p)||(c.oData.sTimeFormat===c.oData.sArrInputTimeFormats[0]?p="11:59:59 PM":c.oData.sTimeFormat===c.oData.sArrInputTimeFormats[1]?p="23:59:59":c.oData.sTimeFormat===c.oData.sArrInputTimeFormats[2]?p="11:59 PM":c.oData.sTimeFormat===c.oData.sArrInputTimeFormats[3]&&(p="23:59"),c.oData.dMaxValue=c._parseTime(p))),a.cf._isValid(p)&&(c.oData.dMaxValue=c._parseTime(p),a.cf._isValid(o)||(c.oData.sTimeFormat===c.oData.sArrInputTimeFormats[0]?o="12:00:00 AM":c.oData.sTimeFormat===c.oData.sArrInputTimeFormats[1]?o="00:00:00":c.oData.sTimeFormat===c.oData.sArrInputTimeFormats[2]?o="12:00 AM":c.oData.sTimeFormat===c.oData.sArrInputTimeFormats[3]&&(o="00:00"),c.oData.dMinValue=c._parseTime(o))),""!==i&&(a.cf._compare(i,"start")||a.cf._compare(i,"end"))&&""!==j&&a(j).length>=1&&""!==(s=c._getValueOfElement(a(j)))&&(c.settings.parseDateTimeString?r=c.settings.parseDateTimeString.call(c,s,d,g,a(j)):t=c._parseTime(s),a.cf._compare(i,"start")?(t.setMinutes(t.getMinutes()-1),a.cf._isValid(p)?2===c._compareTime(t,c.oData.dMaxValue)&&(c.oData.dMaxValue=new Date(t)):c.oData.dMaxValue=new Date(t)):a.cf._compare(i,"end")&&(t.setMinutes(t.getMinutes()+1),a.cf._isValid(o)?3===c._compareTime(t,c.oData.dMinValue)&&(c.oData.dMinValue=new Date(t)):c.oData.dMinValue=new Date(t))),c.settings.parseDateTimeString?c.oData.dCurrentDate=c.settings.parseDateTimeString.call(c,k,d,g,a(b)):c.oData.dCurrentDate=c._parseTime(k)):c.oData.bDateTimeMode&&(o=e||c.settings.minDateTime,p=f||c.settings.maxDateTime,c.oData.sDateTimeFormat=g,c.oData.bIs12Hour=c.getIs12Hour(),a.cf._isValid(o)&&(c.oData.dMinValue=c._parseDateTime(o)),a.cf._isValid(p)&&(c.oData.dMaxValue=c._parseDateTime(p)),""!==i&&(a.cf._compare(i,"start")||a.cf._compare(i,"end"))&&""!==j&&a(j).length>=1&&""!==(u=c._getValueOfElement(a(j)))&&(v=c.settings.parseDateTimeString?c.settings.parseDateTimeString.call(c,u,d,g,a(j)):c._parseDateTime(u),a.cf._compare(i,"start")?a.cf._isValid(p)?c._compareDateTime(v,c.oData.dMaxValue)<0&&(c.oData.dMaxValue=new Date(v)):c.oData.dMaxValue=new Date(v):a.cf._compare(i,"end")&&(a.cf._isValid(o)?c._compareDateTime(v,c.oData.dMinValue)>0&&(c.oData.dMinValue=new Date(v)):c.oData.dMinValue=new Date(v))),c.settings.parseDateTimeString?c.oData.dCurrentDate=c.settings.parseDateTimeString.call(c,k,d,g,a(b)):c.oData.dCurrentDate=c._parseDateTime(k)),c._setVariablesForDate(),c._modifyPicker(),a(c.element).fadeIn(c.settings.animationDuration),c.settings.afterShow&&setTimeout(function(){c.settings.afterShow.call(c,b)},c.settings.animationDuration)}},_hidePicker:function(b,c){var d=this,e=d.oData.oInputElement;d.settings.beforeHide&&d.settings.beforeHide.call(d,e),a.cf._isValid(b)||(b=d.settings.animationDuration),a.cf._isValid(d.oData.oInputElement)&&(a(d.oData.oInputElement).blur(),d.oData.oInputElement=null),a(d.element).fadeOut(b),0===b?a(d.element).find(".dtpicker-subcontent").html(""):setTimeout(function(){a(d.element).find(".dtpicker-subcontent").html("")},b),a(document).unbind("click.DateTimePicker keydown.DateTimePicker keyup.DateTimePicker"),d.settings.afterHide&&(0===b?d.settings.afterHide.call(d,e):setTimeout(function(){d.settings.afterHide.call(d,e)},b)),a.cf._isValid(c)&&d._showPicker(c)},_modifyPicker:function(){var b,c,d=this,e=[];d.oData.bDateMode?(b=d.settings.titleContentDate,c=3,d.oData.bArrMatchFormat[0]?e=["day","month","year"]:d.oData.bArrMatchFormat[1]?e=["month","day","year"]:d.oData.bArrMatchFormat[2]?e=["year","month","day"]:d.oData.bArrMatchFormat[3]?e=["day","month","year"]:d.oData.bArrMatchFormat[4]?(c=2,e=["month","year"]):d.oData.bArrMatchFormat[5]?(c=2,e=["month","year"]):d.oData.bArrMatchFormat[6]?(c=2,e=["month","year"]):d.oData.bArrMatchFormat[7]&&(c=2,e=["year","month"])):d.oData.bTimeMode?(b=d.settings.titleContentTime,d.oData.bArrMatchFormat[0]?(c=4,e=["hour","minutes","seconds","meridiem"]):d.oData.bArrMatchFormat[1]?(c=3,e=["hour","minutes","seconds"]):d.oData.bArrMatchFormat[2]?(c=3,e=["hour","minutes","meridiem"]):d.oData.bArrMatchFormat[3]&&(c=2,e=["hour","minutes"])):d.oData.bDateTimeMode&&(b=d.settings.titleContentDateTime,d.oData.bArrMatchFormat[0]?(c=6,e=["day","month","year","hour","minutes","seconds"]):d.oData.bArrMatchFormat[1]?(c=7,e=["day","month","year","hour","minutes","seconds","meridiem"]):d.oData.bArrMatchFormat[2]?(c=6,e=["month","day","year","hour","minutes","seconds"]):d.oData.bArrMatchFormat[3]?(c=7,e=["month","day","year","hour","minutes","seconds","meridiem"]):d.oData.bArrMatchFormat[4]?(c=6,e=["year","month","day","hour","minutes","seconds"]):d.oData.bArrMatchFormat[5]?(c=7,e=["year","month","day","hour","minutes","seconds","meridiem"]):d.oData.bArrMatchFormat[6]?(c=6,e=["day","month","year","hour","minutes","seconds"]):d.oData.bArrMatchFormat[7]?(c=7,e=["day","month","year","hour","minutes","seconds","meridiem"]):d.oData.bArrMatchFormat[8]?(c=5,e=["day","month","year","hour","minutes"]):d.oData.bArrMatchFormat[9]?(c=6,e=["day","month","year","hour","minutes","meridiem"]):d.oData.bArrMatchFormat[10]?(c=5,e=["month","day","year","hour","minutes"]):d.oData.bArrMatchFormat[11]?(c=6,e=["month","day","year","hour","minutes","meridiem"]):d.oData.bArrMatchFormat[12]?(c=5,e=["year","month","day","hour","minutes"]):d.oData.bArrMatchFormat[13]?(c=6,e=["year","month","day","hour","minutes","meridiem"]):d.oData.bArrMatchFormat[14]?(c=5,e=["day","month","year","hour","minutes"]):d.oData.bArrMatchFormat[15]&&(c=6,e=["day","month","year","hour","minutes","meridiem"]));var f,g="dtpicker-comp"+c,h=!1,i=!1,j=!1;for(f=0;f",h&&(k+="×"),k+="
",k+="");var l="";for(l+="
",f=0;f",l+="
",l+=""+d.settings.incrementButtonContent+"",d.settings.readonlyInputs?l+="":l+="",l+=""+d.settings.decrementButtonContent+"",d.settings.labels&&(l+="
"+d.settings.labels[m]+"
"),l+="
",l+="
"}l+="";var n="";n=i&&j?" dtpicker-twoButtons":" dtpicker-singleButton";var o="";o+="";var p=k+l+o;a(d.element).find(".dtpicker-subcontent").html(p),d._setCurrentDate(),d._addEventHandlersForPicker()},_addEventHandlersForPicker:function(){var b,c,d=this;if(d.settings.isInline||a(document).on("click.DateTimePicker",function(a){d.oData.bElemFocused&&d._hidePicker("")}),a(document).on("keydown.DateTimePicker",function(e){if(c=parseInt(e.keyCode?e.keyCode:e.which),!a(".dtpicker-compValue").is(":focus")&&9===c)return d._setButtonAction(!0),a("[tabIndex="+(d.oData.iTabIndex+1)+"]").focus(),!1;if(a(".dtpicker-compValue").is(":focus")){if(38===c)return b=a(".dtpicker-compValue:focus").parent().attr("class"),d._incrementDecrementActionsUsingArrowAndMouse(b,"inc"),!1;if(40===c)return b=a(".dtpicker-compValue:focus").parent().attr("class"),d._incrementDecrementActionsUsingArrowAndMouse(b,"dec"),!1}}),d.settings.isInline||a(document).on("keydown.DateTimePicker",function(b){c=parseInt(b.keyCode?b.keyCode:b.which),a(".dtpicker-compValue").is(":focus")||9===c||d._hidePicker("")}),a(".dtpicker-cont *").click(function(a){a.stopPropagation()}),d.settings.readonlyInputs||(a(".dtpicker-compValue").not(".month .dtpicker-compValue, .meridiem .dtpicker-compValue").keyup(function(){this.value=this.value.replace(/[^0-9\.]/g,"")}),a(".dtpicker-compValue").focus(function(){d.oData.bElemFocused=!0,a(this).select()}),a(".dtpicker-compValue").blur(function(){d._getValuesFromInputBoxes(),d._setCurrentDate(),d.oData.bElemFocused=!1;var b=a(this).parent().parent();setTimeout(function(){b.is(":last-child")&&!d.oData.bElemFocused&&d._setButtonAction(!1)},50)}),a(".dtpicker-compValue").keyup(function(b){var c,d=a(this),e=d.val(),f=e.length;d.parent().hasClass("day")||d.parent().hasClass("hour")||d.parent().hasClass("minutes")||d.parent().hasClass("meridiem")?f>2&&(c=e.slice(0,2),d.val(c)):d.parent().hasClass("month")?f>3&&(c=e.slice(0,3),d.val(c)):d.parent().hasClass("year")&&f>4&&(c=e.slice(0,4),d.val(c)),9===parseInt(b.keyCode?b.keyCode:b.which)&&a(this).select()})),a(d.element).find(".dtpicker-compValue").on("mousewheel DOMMouseScroll onmousewheel",function(c){if(a(".dtpicker-compValue").is(":focus")){return Math.max(-1,Math.min(1,c.originalEvent.wheelDelta))>0?(b=a(".dtpicker-compValue:focus").parent().attr("class"),d._incrementDecrementActionsUsingArrowAndMouse(b,"inc")):(b=a(".dtpicker-compValue:focus").parent().attr("class"),d._incrementDecrementActionsUsingArrowAndMouse(b,"dec")),!1}}),a(d.element).find(".dtpicker-close").click(function(a){d.settings.buttonClicked&&d.settings.buttonClicked.call(d,"CLOSE",d.oData.oInputElement),d.settings.isInline||d._hidePicker("")}),a(d.element).find(".dtpicker-buttonSet").click(function(a){d.settings.buttonClicked&&d.settings.buttonClicked.call(d,"SET",d.oData.oInputElement),d._setButtonAction(!1)}),a(d.element).find(".dtpicker-buttonClear").click(function(a){d.settings.buttonClicked&&d.settings.buttonClicked.call(d,"CLEAR",d.oData.oInputElement),d._clearButtonAction()}),d.settings.captureTouchHold||d.settings.captureMouseHold){var e="";d.settings.captureTouchHold&&d.oData.bIsTouchDevice&&(e+="touchstart touchmove touchend "),d.settings.captureMouseHold&&(e+="mousedown mouseup"),a(".dtpicker-cont *").on(e,function(a){d._clearIntervalForTouchEvents()}),d._bindTouchEvents("day"),d._bindTouchEvents("month"),d._bindTouchEvents("year"),d._bindTouchEvents("hour"),d._bindTouchEvents("minutes"),d._bindTouchEvents("seconds")}else a(d.element).find(".day .increment, .day .increment *").click(function(a){d.oData.iCurrentDay++,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".day .decrement, .day .decrement *").click(function(a){d.oData.iCurrentDay--,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".month .increment, .month .increment *").click(function(a){d.oData.iCurrentMonth++,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".month .decrement, .month .decrement *").click(function(a){d.oData.iCurrentMonth--,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".year .increment, .year .increment *").click(function(a){d.oData.iCurrentYear++,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".year .decrement, .year .decrement *").click(function(a){d.oData.iCurrentYear--,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".hour .increment, .hour .increment *").click(function(a){d.oData.iCurrentHour++,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".hour .decrement, .hour .decrement *").click(function(a){d.oData.iCurrentHour--,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".minutes .increment, .minutes .increment *").click(function(a){d.oData.iCurrentMinutes+=d.settings.minuteInterval,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".minutes .decrement, .minutes .decrement *").click(function(a){d.oData.iCurrentMinutes-=d.settings.minuteInterval,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".seconds .increment, .seconds .increment *").click(function(a){d.oData.iCurrentSeconds+=d.settings.secondsInterval,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()}),a(d.element).find(".seconds .decrement, .seconds .decrement *").click(function(a){d.oData.iCurrentSeconds-=d.settings.secondsInterval,d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()});a(d.element).find(".meridiem .dtpicker-compButton, .meridiem .dtpicker-compButton *").click(function(b){a.cf._compare(d.oData.sCurrentMeridiem,"AM")?(d.oData.sCurrentMeridiem="PM",d.oData.iCurrentHour+=12):a.cf._compare(d.oData.sCurrentMeridiem,"PM")&&(d.oData.sCurrentMeridiem="AM",d.oData.iCurrentHour-=12),d._setCurrentDate(),d._setOutputOnIncrementOrDecrement()})},_adjustMinutes:function(a){var b=this;return b.settings.roundOffMinutes&&1!==b.settings.minuteInterval&&(a=a%b.settings.minuteInterval?a-a%b.settings.minuteInterval+b.settings.minuteInterval:a),a},_adjustSeconds:function(a){var b=this;return b.settings.roundOffSeconds&&1!==b.settings.secondsInterval&&(a=a%b.settings.secondsInterval?a-a%b.settings.secondsInterval+b.settings.secondsInterval:a),a},_getValueOfElement:function(b){return a.cf._compare(a(b).prop("tagName"),"INPUT")?a(b).val():a(b).html()},_setValueOfElement:function(b,c){var d=this;a.cf._isValid(c)||(c=a(d.oData.oInputElement)),a.cf._compare(c.prop("tagName"),"INPUT")?c.val(b):c.html(b);var e=d.getDateObjectForInputField(c);return d.settings.settingValueOfElement&&d.settings.settingValueOfElement.call(d,b,e,c),c.change(),b},_bindTouchEvents:function(b){var c=this;a(c.element).find("."+b+" .increment, ."+b+" .increment *").on("touchstart mousedown",function(d){d.stopPropagation(),a.cf._isValid(c.oData.sTouchButton)||(c.oData.iTouchStart=(new Date).getTime(),c.oData.sTouchButton=b+"-inc",c._setIntervalForTouchEvents())}),a(c.element).find("."+b+" .increment, ."+b+" .increment *").on("touchend mouseup",function(a){a.stopPropagation(),c._clearIntervalForTouchEvents()}),a(c.element).find("."+b+" .decrement, ."+b+" .decrement *").on("touchstart mousedown",function(d){d.stopPropagation(),a.cf._isValid(c.oData.sTouchButton)||(c.oData.iTouchStart=(new Date).getTime(),c.oData.sTouchButton=b+"-dec",c._setIntervalForTouchEvents())}),a(c.element).find("."+b+" .decrement, ."+b+" .decrement *").on("touchend mouseup",function(a){a.stopPropagation(),c._clearIntervalForTouchEvents()})},_setIntervalForTouchEvents:function(){var b=this,c=b.oData.bIsTouchDevice?b.settings.touchHoldInterval:b.settings.mouseHoldInterval;if(!a.cf._isValid(b.oData.oTimeInterval)){var d;b.oData.oTimeInterval=setInterval(function(){(d=(new Date).getTime()-b.oData.iTouchStart)>c&&a.cf._isValid(b.oData.sTouchButton)&&("day-inc"===b.oData.sTouchButton?b.oData.iCurrentDay++:"day-dec"===b.oData.sTouchButton?b.oData.iCurrentDay--:"month-inc"===b.oData.sTouchButton?b.oData.iCurrentMonth++:"month-dec"===b.oData.sTouchButton?b.oData.iCurrentMonth--:"year-inc"===b.oData.sTouchButton?b.oData.iCurrentYear++:"year-dec"===b.oData.sTouchButton?b.oData.iCurrentYear--:"hour-inc"===b.oData.sTouchButton?b.oData.iCurrentHour++:"hour-dec"===b.oData.sTouchButton?b.oData.iCurrentHour--:"minute-inc"===b.oData.sTouchButton?b.oData.iCurrentMinutes+=b.settings.minuteInterval:"minute-dec"===b.oData.sTouchButton?b.oData.iCurrentMinutes-=b.settings.minuteInterval:"second-inc"===b.oData.sTouchButton?b.oData.iCurrentSeconds+=b.settings.secondsInterval:"second-dec"===b.oData.sTouchButton&&(b.oData.iCurrentSeconds-=b.settings.secondsInterval),b._setCurrentDate(),b._setOutputOnIncrementOrDecrement(),b.oData.iTouchStart=(new Date).getTime())},c)}},_clearIntervalForTouchEvents:function(){var b=this;clearInterval(b.oData.oTimeInterval),a.cf._isValid(b.oData.sTouchButton)&&(b.oData.sTouchButton=null,b.oData.iTouchStart=0),b.oData.oTimeInterval=null},_incrementDecrementActionsUsingArrowAndMouse:function(a,b){var c=this;a.includes("day")?"inc"===b?c.oData.iCurrentDay++:"dec"===b&&c.oData.iCurrentDay--:a.includes("month")?"inc"===b?c.oData.iCurrentMonth++:"dec"===b&&c.oData.iCurrentMonth--:a.includes("year")?"inc"===b?c.oData.iCurrentYear++:"dec"===b&&c.oData.iCurrentYear--:a.includes("hour")?"inc"===b?c.oData.iCurrentHour++:"dec"===b&&c.oData.iCurrentHour--:a.includes("minutes")?"inc"===b?c.oData.iCurrentMinutes+=c.settings.minuteInterval:"dec"===b&&(c.oData.iCurrentMinutes-=c.settings.minuteInterval):a.includes("seconds")&&("inc"===b?c.oData.iCurrentSeconds+=c.settings.secondsInterval:"dec"===b&&(c.oData.iCurrentSeconds-=c.settings.secondsInterval)),c._setCurrentDate(),c._setOutputOnIncrementOrDecrement()},_parseDate:function(b){var c=this,d=c.settings.defaultDate?new Date(c.settings.defaultDate):new Date,e=d.getDate(),f=d.getMonth(),g=d.getFullYear();if(a.cf._isValid(b))if("string"==typeof b){var h;h=c.oData.bArrMatchFormat[4]||c.oData.bArrMatchFormat[5]||c.oData.bArrMatchFormat[6]?b.split(c.settings.monthYearSeparator):b.split(c.settings.dateSeparator),c.oData.bArrMatchFormat[0]?(e=parseInt(h[0]),f=parseInt(h[1]-1),g=parseInt(h[2])):c.oData.bArrMatchFormat[1]?(f=parseInt(h[0]-1),e=parseInt(h[1]),g=parseInt(h[2])):c.oData.bArrMatchFormat[2]?(g=parseInt(h[0]),f=parseInt(h[1]-1),e=parseInt(h[2])):c.oData.bArrMatchFormat[3]?(e=parseInt(h[0]),f=c._getShortMonthIndex(h[1]),g=parseInt(h[2])):c.oData.bArrMatchFormat[4]?(e=1,f=parseInt(h[0])-1,g=parseInt(h[1])):c.oData.bArrMatchFormat[5]?(e=1,f=c._getShortMonthIndex(h[0]),g=parseInt(h[1])):c.oData.bArrMatchFormat[6]?(e=1,f=c._getFullMonthIndex(h[0]),g=parseInt(h[1])):c.oData.bArrMatchFormat[7]&&(e=1,f=parseInt(h[1])-1,g=parseInt(h[0]))}else e=b.getDate(),f=b.getMonth(),g=b.getFullYear();return d=new Date(g,f,e,0,0,0,0)},_parseTime:function(b){var c,d,e,f=this,g=f.settings.defaultDate?new Date(f.settings.defaultDate):new Date,h=g.getDate(),i=g.getMonth(),j=g.getFullYear(),k=g.getHours(),l=g.getMinutes(),m=g.getSeconds(),n=f.oData.bArrMatchFormat[0]||f.oData.bArrMatchFormat[1];return m=n?f._adjustSeconds(m):0,a.cf._isValid(b)&&("string"==typeof b?(f.oData.bIs12Hour&&(c=b.split(f.settings.timeMeridiemSeparator),b=c[0],d=c[1],a.cf._compare(d,"AM")||a.cf._compare(d,"PM")||(d="")),e=b.split(f.settings.timeSeparator),k=parseInt(e[0]),l=parseInt(e[1]),n&&(m=parseInt(e[2]),m=f._adjustSeconds(m)),12===k&&a.cf._compare(d,"AM")?k=0:k<12&&a.cf._compare(d,"PM")&&(k+=12)):(k=b.getHours(),l=b.getMinutes(),n&&(m=b.getSeconds(),m=f._adjustSeconds(m)))),l=f._adjustMinutes(l),g=new Date(j,i,h,k,l,m,0)},_parseDateTime:function(b){var c,d,e,f,g,h=this,i=h.settings.defaultDate?new Date(h.settings.defaultDate):new Date,j=i.getDate(),k=i.getMonth(),l=i.getFullYear(),m=i.getHours(),n=i.getMinutes(),o=i.getSeconds(),p="",q=h.oData.bArrMatchFormat[0]||h.oData.bArrMatchFormat[1]||h.oData.bArrMatchFormat[2]||h.oData.bArrMatchFormat[3]||h.oData.bArrMatchFormat[4]||h.oData.bArrMatchFormat[5]||h.oData.bArrMatchFormat[6]||h.oData.bArrMatchFormat[7];return o=q?h._adjustSeconds(o):0,a.cf._isValid(b)&&("string"==typeof b?(c=b.split(h.settings.dateTimeSeparator),d=c[0].split(h.settings.dateSeparator),h.oData.bArrMatchFormat[0]||h.oData.bArrMatchFormat[1]||h.oData.bArrMatchFormat[8]||h.oData.bArrMatchFormat[9]?(j=parseInt(d[0]),k=parseInt(d[1]-1),l=parseInt(d[2])):h.oData.bArrMatchFormat[2]||h.oData.bArrMatchFormat[3]||h.oData.bArrMatchFormat[10]||h.oData.bArrMatchFormat[11]?(k=parseInt(d[0]-1),j=parseInt(d[1]),l=parseInt(d[2])):h.oData.bArrMatchFormat[4]||h.oData.bArrMatchFormat[5]||h.oData.bArrMatchFormat[12]||h.oData.bArrMatchFormat[13]?(l=parseInt(d[0]),k=parseInt(d[1]-1),j=parseInt(d[2])):(h.oData.bArrMatchFormat[6]||h.oData.bArrMatchFormat[7]||h.oData.bArrMatchFormat[14]||h.oData.bArrMatchFormat[15])&&(j=parseInt(d[0]),k=h._getShortMonthIndex(d[1]),l=parseInt(d[2])),e=c[1],a.cf._isValid(e)&&(h.oData.bIs12Hour&&(a.cf._compare(h.settings.dateTimeSeparator,h.settings.timeMeridiemSeparator)&&3===c.length?p=c[2]:(f=e.split(h.settings.timeMeridiemSeparator),e=f[0],p=f[1]),a.cf._compare(p,"AM")||a.cf._compare(p,"PM")||(p="")),g=e.split(h.settings.timeSeparator),m=parseInt(g[0]),n=parseInt(g[1]),q&&(o=parseInt(g[2])),12===m&&a.cf._compare(p,"AM")?m=0:m<12&&a.cf._compare(p,"PM")&&(m+=12))):(j=b.getDate(),k=b.getMonth(),l=b.getFullYear(),m=b.getHours(),n=b.getMinutes(),q&&(o=b.getSeconds(),o=h._adjustSeconds(o)))),n=h._adjustMinutes(n),i=new Date(l,k,j,m,n,o,0)},_getShortMonthIndex:function(b){for(var c=this,d=0;d1&&(c=c.charAt(0).toUpperCase()+c.slice(1)),d=b.settings.shortMonthNames.indexOf(c),-1!==d?b.oData.iCurrentMonth=parseInt(d):c.match("^[+|-]?[0-9]+$")&&(b.oData.iCurrentMonth=parseInt(c-1)),b.oData.iCurrentDay=parseInt(a(b.element).find(".day .dtpicker-compValue").val())||b.oData.iCurrentDay,b.oData.iCurrentYear=parseInt(a(b.element).find(".year .dtpicker-compValue").val())||b.oData.iCurrentYear}if(b.oData.bTimeMode||b.oData.bDateTimeMode){var e,f,g,h;e=parseInt(a(b.element).find(".hour .dtpicker-compValue").val()),f=b._adjustMinutes(parseInt(a(b.element).find(".minutes .dtpicker-compValue").val())),g=b._adjustMinutes(parseInt(a(b.element).find(".seconds .dtpicker-compValue").val())),b.oData.iCurrentHour=isNaN(e)?b.oData.iCurrentHour:e,b.oData.iCurrentMinutes=isNaN(f)?b.oData.iCurrentMinutes:f,b.oData.iCurrentSeconds=isNaN(g)?b.oData.iCurrentSeconds:g,b.oData.iCurrentSeconds>59&&(b.oData.iCurrentMinutes+=b.oData.iCurrentSeconds/60,b.oData.iCurrentSeconds=b.oData.iCurrentSeconds%60),b.oData.iCurrentMinutes>59&&(b.oData.iCurrentHour+=b.oData.iCurrentMinutes/60,b.oData.iCurrentMinutes=b.oData.iCurrentMinutes%60),b.oData.bIs12Hour?b.oData.iCurrentHour>12&&(b.oData.iCurrentHour=b.oData.iCurrentHour%12):b.oData.iCurrentHour>23&&(b.oData.iCurrentHour=b.oData.iCurrentHour%23),b.oData.bIs12Hour&&(h=a(b.element).find(".meridiem .dtpicker-compValue").val(),(a.cf._compare(h,"AM")||a.cf._compare(h,"PM"))&&(b.oData.sCurrentMeridiem=h),a.cf._compare(b.oData.sCurrentMeridiem,"PM")&&12!==b.oData.iCurrentHour&&b.oData.iCurrentHour<13&&(b.oData.iCurrentHour+=12),a.cf._compare(b.oData.sCurrentMeridiem,"AM")&&12===b.oData.iCurrentHour&&(b.oData.iCurrentHour=0))}},_setCurrentDate:function(){var b=this;(b.oData.bTimeMode||b.oData.bDateTimeMode)&&(b.oData.iCurrentSeconds>59?(b.oData.iCurrentMinutes+=b.oData.iCurrentSeconds/60,b.oData.iCurrentSeconds=b.oData.iCurrentSeconds%60):b.oData.iCurrentSeconds<0&&(b.oData.iCurrentMinutes-=b.settings.minuteInterval,b.oData.iCurrentSeconds+=60),b.oData.iCurrentMinutes=b._adjustMinutes(b.oData.iCurrentMinutes),b.oData.iCurrentSeconds=b._adjustSeconds(b.oData.iCurrentSeconds));var c,d,e,f,g,h,i,j=new Date(b.oData.iCurrentYear,b.oData.iCurrentMonth,b.oData.iCurrentDay,b.oData.iCurrentHour,b.oData.iCurrentMinutes,b.oData.iCurrentSeconds,0),k=!1,l=!1;if(null!==b.oData.dMaxValue&&(k=j.getTime()>b.oData.dMaxValue.getTime()),null!==b.oData.dMinValue&&(l=j.getTime()b.oData.dMaxValue.getTime()),null!==b.oData.dMinValue&&(n=b.oData.dCurrentDate.getTime()12&&(e-=12),"00"===g&&(e=12),f=e<10?"0"+e:e,j.oData.bIs12Hour&&(g=f),h=k.iCurrentMinutes,h=h<10?"0"+h:h,i=k.iCurrentSeconds,i=i<10?"0"+i:i,{H:c,HH:d,h:e,hh:f,hour:g,m:k.iCurrentMinutes,mm:h,s:k.iCurrentSeconds,ss:i,ME:k.sCurrentMeridiem}},_setButtons:function(){var b=this;a(b.element).find(".dtpicker-compButton").removeClass("dtpicker-compButtonDisable").addClass("dtpicker-compButtonEnable");var c;if(null!==b.oData.dMaxValue&&(b.oData.bTimeMode?((b.oData.iCurrentHour+1>b.oData.dMaxValue.getHours()||b.oData.iCurrentHour+1===b.oData.dMaxValue.getHours()&&b.oData.iCurrentMinutes>b.oData.dMaxValue.getMinutes())&&a(b.element).find(".hour .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"),b.oData.iCurrentHour>=b.oData.dMaxValue.getHours()&&b.oData.iCurrentMinutes+1>b.oData.dMaxValue.getMinutes()&&a(b.element).find(".minutes .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable")):(c=new Date(b.oData.iCurrentYear,b.oData.iCurrentMonth,b.oData.iCurrentDay+1,b.oData.iCurrentHour,b.oData.iCurrentMinutes,b.oData.iCurrentSeconds,0),c.getTime()>b.oData.dMaxValue.getTime()&&a(b.element).find(".day .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"),c=new Date(b.oData.iCurrentYear,b.oData.iCurrentMonth+1,b.oData.iCurrentDay,b.oData.iCurrentHour,b.oData.iCurrentMinutes,b.oData.iCurrentSeconds,0),c.getTime()>b.oData.dMaxValue.getTime()&&a(b.element).find(".month .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"),c=new Date(b.oData.iCurrentYear+1,b.oData.iCurrentMonth,b.oData.iCurrentDay,b.oData.iCurrentHour,b.oData.iCurrentMinutes,b.oData.iCurrentSeconds,0),c.getTime()>b.oData.dMaxValue.getTime()&&a(b.element).find(".year .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"),c=new Date(b.oData.iCurrentYear,b.oData.iCurrentMonth,b.oData.iCurrentDay,b.oData.iCurrentHour+1,b.oData.iCurrentMinutes,b.oData.iCurrentSeconds,0),c.getTime()>b.oData.dMaxValue.getTime()&&a(b.element).find(".hour .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"),c=new Date(b.oData.iCurrentYear,b.oData.iCurrentMonth,b.oData.iCurrentDay,b.oData.iCurrentHour,b.oData.iCurrentMinutes+1,b.oData.iCurrentSeconds,0),c.getTime()>b.oData.dMaxValue.getTime()&&a(b.element).find(".minutes .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"),c=new Date(b.oData.iCurrentYear,b.oData.iCurrentMonth,b.oData.iCurrentDay,b.oData.iCurrentHour,b.oData.iCurrentMinutes,b.oData.iCurrentSeconds+1,0),c.getTime()>b.oData.dMaxValue.getTime()&&a(b.element).find(".seconds .increment").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable"))),null!==b.oData.dMinValue&&(b.oData.bTimeMode?((b.oData.iCurrentHour-1b.oData.dMaxValue.getHours()||d===b.oData.dMaxValue.getHours()&&e>b.oData.dMaxValue.getMinutes())&&a(b.element).find(".meridiem .dtpicker-compButton").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable")):c.getTime()>b.oData.dMaxValue.getTime()&&a(b.element).find(".meridiem .dtpicker-compButton").removeClass("dtpicker-compButtonEnable").addClass("dtpicker-compButtonDisable")),null!==b.oData.dMinValue&&(b.oData.bTimeMode?(e=b.oData.iCurrentMinutes,(db.getHours()?c=3:a.getHours()===b.getHours()&&(a.getMinutes()b.getMinutes()&&(c=3)),c},_compareDateTime:function(a,b){var c=(a.getTime()-b.getTime())/6e4;return 0===c?c:c/Math.abs(c)},_determineMeridiemFromHourAndMinutes:function(a,b){return a>12||12===a&&b>=0?"PM":"AM"},setLanguage:function(b){var c=this;return c.settings=a.extend({},a.DateTimePicker.defaults,a.DateTimePicker.i18n[b],c.options),c.settings.language=b,c._setDateFormatArray(),c._setTimeFormatArray(),c._setDateTimeFormatArray(),c}}}); \ No newline at end of file diff --git a/dist/DateTimePicker_iOS_fix.js b/dist/DateTimePicker_iOS_fix.js index 33e230f..73f5e78 100644 --- a/dist/DateTimePicker_iOS_fix.js +++ b/dist/DateTimePicker_iOS_fix.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-cs.js b/dist/i18n/DateTimePicker-i18n-cs.js index 0084703..5daf377 100644 --- a/dist/i18n/DateTimePicker-i18n-cs.js +++ b/dist/i18n/DateTimePicker-i18n-cs.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-de.js b/dist/i18n/DateTimePicker-i18n-de.js index 373abd3..fb3b5d1 100644 --- a/dist/i18n/DateTimePicker-i18n-de.js +++ b/dist/i18n/DateTimePicker-i18n-de.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-en.js b/dist/i18n/DateTimePicker-i18n-en.js index f905fe1..006d198 100644 --- a/dist/i18n/DateTimePicker-i18n-en.js +++ b/dist/i18n/DateTimePicker-i18n-en.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-es.js b/dist/i18n/DateTimePicker-i18n-es.js index 6134128..133f96d 100644 --- a/dist/i18n/DateTimePicker-i18n-es.js +++ b/dist/i18n/DateTimePicker-i18n-es.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-fr.js b/dist/i18n/DateTimePicker-i18n-fr.js index 990eb3b..6673626 100644 --- a/dist/i18n/DateTimePicker-i18n-fr.js +++ b/dist/i18n/DateTimePicker-i18n-fr.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-it.js b/dist/i18n/DateTimePicker-i18n-it.js index d4f0c63..78d515d 100644 --- a/dist/i18n/DateTimePicker-i18n-it.js +++ b/dist/i18n/DateTimePicker-i18n-it.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-ja.js b/dist/i18n/DateTimePicker-i18n-ja.js index 218ae3e..40325d9 100755 --- a/dist/i18n/DateTimePicker-i18n-ja.js +++ b/dist/i18n/DateTimePicker-i18n-ja.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-ko.js b/dist/i18n/DateTimePicker-i18n-ko.js index b5ae224..89b9b84 100755 --- a/dist/i18n/DateTimePicker-i18n-ko.js +++ b/dist/i18n/DateTimePicker-i18n-ko.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-nb.js b/dist/i18n/DateTimePicker-i18n-nb.js index 93d64b1..53694ee 100644 --- a/dist/i18n/DateTimePicker-i18n-nb.js +++ b/dist/i18n/DateTimePicker-i18n-nb.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-nl.js b/dist/i18n/DateTimePicker-i18n-nl.js index 427750a..49a1302 100644 --- a/dist/i18n/DateTimePicker-i18n-nl.js +++ b/dist/i18n/DateTimePicker-i18n-nl.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-ro.js b/dist/i18n/DateTimePicker-i18n-ro.js index 176bbc7..b9cda21 100644 --- a/dist/i18n/DateTimePicker-i18n-ro.js +++ b/dist/i18n/DateTimePicker-i18n-ro.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-ru.js b/dist/i18n/DateTimePicker-i18n-ru.js index 6530276..90f60fe 100644 --- a/dist/i18n/DateTimePicker-i18n-ru.js +++ b/dist/i18n/DateTimePicker-i18n-ru.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-uk.js b/dist/i18n/DateTimePicker-i18n-uk.js index 557e6e7..63160a2 100644 --- a/dist/i18n/DateTimePicker-i18n-uk.js +++ b/dist/i18n/DateTimePicker-i18n-uk.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-zh-TW.js b/dist/i18n/DateTimePicker-i18n-zh-TW.js index 4f6a5fb..5f9be8e 100644 --- a/dist/i18n/DateTimePicker-i18n-zh-TW.js +++ b/dist/i18n/DateTimePicker-i18n-zh-TW.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n.js b/dist/i18n/DateTimePicker-i18n.js index d62bf44..fa3c85f 100644 --- a/dist/i18n/DateTimePicker-i18n.js +++ b/dist/i18n/DateTimePicker-i18n.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/dist/i18n/DatetimePicker-i18n-zh-CN.js b/dist/i18n/DatetimePicker-i18n-zh-CN.js index af94280..21f866d 100644 --- a/dist/i18n/DatetimePicker-i18n-zh-CN.js +++ b/dist/i18n/DatetimePicker-i18n-zh-CN.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..f7b59af --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1106 @@ +{ + "name": "datetimepicker", + "version": "0.1.38", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi-regex": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz", + "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=", + "dev": true + }, + "ansi-styles": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz", + "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=", + "dev": true + }, + "argparse": { + "version": "0.1.16", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz", + "integrity": "sha1-z9AeD7uj1srtBJ+9dY1A9lGW9Xw=", + "dev": true, + "requires": { + "underscore": "1.7.0", + "underscore.string": "2.4.0" + }, + "dependencies": { + "underscore.string": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz", + "integrity": "sha1-jN2PusTi0uoefi6Al8QvRCKA+Fs=", + "dev": true + } + } + }, + "async": { + "version": "0.1.22", + "resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz", + "integrity": "sha1-D8GqoIig4+8Ovi2IMbqw3PiEUGE=", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chalk": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz", + "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", + "dev": true, + "requires": { + "ansi-styles": "1.1.0", + "escape-string-regexp": "1.0.5", + "has-ansi": "0.1.0", + "strip-ansi": "0.3.0", + "supports-color": "0.2.0" + } + }, + "clean-css": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-0.10.2.tgz", + "integrity": "sha1-qs3DMy3+mnWXDHOsSse8u9CaHWc=", + "dev": true, + "requires": { + "commander": "1.1.1" + } + }, + "cli": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/cli/-/cli-0.6.6.tgz", + "integrity": "sha1-Aq1Eo4Cr8nraxebwzdewQ9dMU+M=", + "dev": true, + "requires": { + "exit": "0.1.2", + "glob": "3.2.11" + }, + "dependencies": { + "glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", + "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "minimatch": "0.3.0" + } + }, + "minimatch": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", + "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", + "dev": true, + "requires": { + "lru-cache": "2.7.3", + "sigmund": "1.0.1" + } + } + } + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + } + }, + "coffee-script": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz", + "integrity": "sha1-FQ1rTLUiiUNp7+1qIQHCC8f0pPQ=", + "dev": true + }, + "colors": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", + "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=", + "dev": true + }, + "commander": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-1.1.1.tgz", + "integrity": "sha1-UNFlGGiuYOzP8KLZ80WVN2vGsEE=", + "dev": true, + "requires": { + "keypress": "0.1.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "1.1.1", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "typedarray": "0.0.6" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "5.1.2" + } + } + } + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "0.1.4" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "csslint": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/csslint/-/csslint-0.10.0.tgz", + "integrity": "sha1-OmoE51Zcjp0ZvrSXZ8fslug2WAU=", + "dev": true, + "requires": { + "parserlib": "0.2.5" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "dateformat": { + "version": "1.0.2-1.2.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.2-1.2.3.tgz", + "integrity": "sha1-sCIMAt6YYXQztyhRz0fePfLNvuk=", + "dev": true + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "deep-equal": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-0.0.0.tgz", + "integrity": "sha1-mWedO70EcVb81FDT0B7rkGhpHoM=", + "dev": true + }, + "defined": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-0.0.0.tgz", + "integrity": "sha1-817qfXBekzuvE7LwOz+D2SFAOz4=", + "dev": true + }, + "dom-serializer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", + "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", + "dev": true, + "requires": { + "domelementtype": "1.3.1", + "entities": "1.1.2" + }, + "dependencies": { + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + } + } + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "domhandler": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", + "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", + "dev": true, + "requires": { + "domelementtype": "1.3.1" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0.1.1", + "domelementtype": "1.3.1" + } + }, + "entities": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", + "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", + "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=", + "dev": true + }, + "eventemitter2": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", + "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=", + "dev": true + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, + "findup-sync": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.1.3.tgz", + "integrity": "sha1-fz56l7gjksZTvwZYm9hRkOk8NoM=", + "dev": true, + "requires": { + "glob": "3.2.11", + "lodash": "2.4.2" + }, + "dependencies": { + "glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", + "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "minimatch": "0.3.0" + } + }, + "lodash": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", + "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", + "dev": true + }, + "minimatch": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", + "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", + "dev": true, + "requires": { + "lru-cache": "2.7.3", + "sigmund": "1.0.1" + } + } + } + }, + "getobject": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz", + "integrity": "sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw=", + "dev": true + }, + "glob": { + "version": "3.1.21", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", + "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", + "dev": true, + "requires": { + "graceful-fs": "1.2.3", + "inherits": "1.0.2", + "minimatch": "0.2.14" + }, + "dependencies": { + "inherits": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", + "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", + "dev": true + } + } + }, + "graceful-fs": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", + "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", + "dev": true + }, + "grunt": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.5.tgz", + "integrity": "sha1-VpN81RlDJK3/bSB2MYMqnWuk5/A=", + "dev": true, + "requires": { + "async": "0.1.22", + "coffee-script": "1.3.3", + "colors": "0.6.2", + "dateformat": "1.0.2-1.2.3", + "eventemitter2": "0.4.14", + "exit": "0.1.2", + "findup-sync": "0.1.3", + "getobject": "0.1.0", + "glob": "3.1.21", + "grunt-legacy-log": "0.1.3", + "grunt-legacy-util": "0.2.0", + "hooker": "0.2.3", + "iconv-lite": "0.2.11", + "js-yaml": "2.0.5", + "lodash": "0.9.2", + "minimatch": "0.2.14", + "nopt": "1.0.10", + "rimraf": "2.2.8", + "underscore.string": "2.2.1", + "which": "1.0.9" + } + }, + "grunt-contrib-concat": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-0.5.1.tgz", + "integrity": "sha1-lTxu/f39LBB6uchQd/LUsk0xzUk=", + "dev": true, + "requires": { + "chalk": "0.5.1", + "source-map": "0.3.0" + } + }, + "grunt-contrib-copy": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-0.4.1.tgz", + "integrity": "sha1-8HU7QK4hu3BtrvsLKZ4DzfX6nW4=", + "dev": true + }, + "grunt-contrib-csslint": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-csslint/-/grunt-contrib-csslint-0.5.0.tgz", + "integrity": "sha1-vEnCS9X+CQ69IDYDtyIppIZUGBI=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "csslint": "0.10.0", + "lodash": "3.10.1", + "strip-json-comments": "1.0.4" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "lodash": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "grunt-contrib-cssmin": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-cssmin/-/grunt-contrib-cssmin-0.5.0.tgz", + "integrity": "sha1-F2Dm+iiAy/vhMMLFoa7ei6J6Y9g=", + "dev": true, + "requires": { + "clean-css": "0.10.2", + "grunt-lib-contrib": "0.6.1" + } + }, + "grunt-contrib-jshint": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-0.11.3.tgz", + "integrity": "sha1-gDaBgdzNVRGG5bg4XAEc7iTWQKA=", + "dev": true, + "requires": { + "hooker": "0.2.3", + "jshint": "2.8.0" + } + }, + "grunt-contrib-uglify": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-0.4.1.tgz", + "integrity": "sha1-1D87xuAsM1Vj+MT58IE/tLD/ebE=", + "dev": true, + "requires": { + "chalk": "0.4.0", + "maxmin": "0.1.0", + "uglify-js": "2.8.29" + }, + "dependencies": { + "ansi-styles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz", + "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=", + "dev": true + }, + "chalk": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", + "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", + "dev": true, + "requires": { + "ansi-styles": "1.0.0", + "has-color": "0.1.7", + "strip-ansi": "0.1.1" + } + }, + "strip-ansi": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz", + "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=", + "dev": true + } + } + }, + "grunt-legacy-log": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-0.1.3.tgz", + "integrity": "sha1-7ClCboAwIa9ZAp+H0vnNczWgVTE=", + "dev": true, + "requires": { + "colors": "0.6.2", + "grunt-legacy-log-utils": "0.1.1", + "hooker": "0.2.3", + "lodash": "2.4.2", + "underscore.string": "2.3.3" + }, + "dependencies": { + "lodash": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", + "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", + "dev": true + }, + "underscore.string": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz", + "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0=", + "dev": true + } + } + }, + "grunt-legacy-log-utils": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-0.1.1.tgz", + "integrity": "sha1-wHBrndkGThFvNvI/5OawSGcsD34=", + "dev": true, + "requires": { + "colors": "0.6.2", + "lodash": "2.4.2", + "underscore.string": "2.3.3" + }, + "dependencies": { + "lodash": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", + "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", + "dev": true + }, + "underscore.string": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz", + "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0=", + "dev": true + } + } + }, + "grunt-legacy-util": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-0.2.0.tgz", + "integrity": "sha1-kzJIhNv343qf98Am3/RR2UqeVUs=", + "dev": true, + "requires": { + "async": "0.1.22", + "exit": "0.1.2", + "getobject": "0.1.0", + "hooker": "0.2.3", + "lodash": "0.9.2", + "underscore.string": "2.2.1", + "which": "1.0.9" + } + }, + "grunt-lib-contrib": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/grunt-lib-contrib/-/grunt-lib-contrib-0.6.1.tgz", + "integrity": "sha1-P1att9oG6BR5XuJBWw6+X7iQPrs=", + "dev": true, + "requires": { + "zlib-browserify": "0.0.1" + } + }, + "gzip-size": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-0.1.1.tgz", + "integrity": "sha1-rjNIO2/IIk6DQilt4Qjvk3V/duA=", + "dev": true, + "requires": { + "concat-stream": "1.6.2", + "zlib-browserify": "0.0.3" + }, + "dependencies": { + "zlib-browserify": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/zlib-browserify/-/zlib-browserify-0.0.3.tgz", + "integrity": "sha1-JAzNv9AgP6hCsTDe77FBQSLIzFA=", + "dev": true, + "requires": { + "tape": "0.2.2" + } + } + } + }, + "has-ansi": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz", + "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=", + "dev": true, + "requires": { + "ansi-regex": "0.2.1" + } + }, + "has-color": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", + "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=", + "dev": true + }, + "hooker": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", + "integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk=", + "dev": true + }, + "htmlparser2": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", + "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", + "dev": true, + "requires": { + "domelementtype": "1.3.1", + "domhandler": "2.3.0", + "domutils": "1.5.1", + "entities": "1.0.0", + "readable-stream": "1.1.14" + } + }, + "iconv-lite": { + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz", + "integrity": "sha1-HOYKOleGSiktEyH/RgnKS7llrcg=", + "dev": true + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "js-yaml": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-2.0.5.tgz", + "integrity": "sha1-olrmUJmZ6X3yeMZxnaEb0Gh3Q6g=", + "dev": true, + "requires": { + "argparse": "0.1.16", + "esprima": "1.0.4" + } + }, + "jshint": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.8.0.tgz", + "integrity": "sha1-HQmjvZE8TK36gb8Y1YK9hb/+DUQ=", + "dev": true, + "requires": { + "cli": "0.6.6", + "console-browserify": "1.1.0", + "exit": "0.1.2", + "htmlparser2": "3.8.3", + "lodash": "3.7.0", + "minimatch": "2.0.10", + "shelljs": "0.3.0", + "strip-json-comments": "1.0.4" + }, + "dependencies": { + "lodash": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.7.0.tgz", + "integrity": "sha1-Nni9irmVBXwHreg27S7wh9qBHUU=", + "dev": true + }, + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "dev": true, + "requires": { + "brace-expansion": "1.1.11" + } + } + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "keypress": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/keypress/-/keypress-0.1.0.tgz", + "integrity": "sha1-SjGI1CkbZrT2XtuZ+AaqmuKTWSo=", + "dev": true + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true + }, + "lodash": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-0.9.2.tgz", + "integrity": "sha1-jzSZxSRdNG1oLlsNO0B2fgnxqSw=", + "dev": true + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "lru-cache": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", + "dev": true + }, + "maxmin": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-0.1.0.tgz", + "integrity": "sha1-ldgcUonjqdMPf8fcVZwCTlAwydA=", + "dev": true, + "requires": { + "chalk": "0.4.0", + "gzip-size": "0.1.1", + "pretty-bytes": "0.1.2" + }, + "dependencies": { + "ansi-styles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz", + "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=", + "dev": true + }, + "chalk": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", + "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", + "dev": true, + "requires": { + "ansi-styles": "1.0.0", + "has-color": "0.1.7", + "strip-ansi": "0.1.1" + } + }, + "strip-ansi": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz", + "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=", + "dev": true + } + } + }, + "minimatch": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "dev": true, + "requires": { + "lru-cache": "2.7.3", + "sigmund": "1.0.1" + } + }, + "nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "dev": true, + "requires": { + "abbrev": "1.1.1" + } + }, + "parserlib": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/parserlib/-/parserlib-0.2.5.tgz", + "integrity": "sha1-hZB92GBaoGq7PdKV1QuyuPpN0Rc=", + "dev": true + }, + "pretty-bytes": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-0.1.2.tgz", + "integrity": "sha1-zZApTVihyk6KXQ+5yCJZmIgazwA=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "requires": { + "align-text": "0.1.4" + } + }, + "rimraf": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", + "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "shelljs": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", + "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=", + "dev": true + }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", + "dev": true + }, + "source-map": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.3.0.tgz", + "integrity": "sha1-hYb7mloAXltQHiHNGLbyG0V60fk=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "strip-ansi": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz", + "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", + "dev": true, + "requires": { + "ansi-regex": "0.2.1" + } + }, + "strip-json-comments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", + "dev": true + }, + "supports-color": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz", + "integrity": "sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=", + "dev": true + }, + "tape": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/tape/-/tape-0.2.2.tgz", + "integrity": "sha1-ZMz6S37PSgBgAH5hcW1CR4FnFjc=", + "dev": true, + "requires": { + "deep-equal": "0.0.0", + "defined": "0.0.0", + "jsonify": "0.0.0" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "requires": { + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "underscore": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", + "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=", + "dev": true + }, + "underscore.string": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz", + "integrity": "sha1-18D6KvXVoaZ/QlPa7pgTLnM/Dxk=", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "which": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/which/-/which-1.0.9.tgz", + "integrity": "sha1-RgwdoPgQED0DIam2M6+eV15kSG8=", + "dev": true + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } + }, + "zlib-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/zlib-browserify/-/zlib-browserify-0.0.1.tgz", + "integrity": "sha1-T6akXQDbwV8xikr6HZr8Aljhdsw=", + "dev": true + } + } +} diff --git a/package.json b/package.json index de6034e..b153dfe 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,8 @@ { "name": "datetimepicker", - "version": "0.1.38", - "description": "Responsive flat design jQuery DateTime Picker plugin for Web & Mobile", - - "keywords": - [ + "keywords": [ "date", "time", "picker", @@ -17,50 +13,35 @@ "timepicker", "input" ], - "bugs": { "url": "https://github.com/nehakadam/DateTimePicker/issues", "email": "nehakadam9@gmail.com" }, - "author": "Neha Kadam (https://github.com/nehakadam)", - "_npmUser": { "name": "nehakadam", "email": "nehakadam9@gmail.com" }, - "homepage": "https://nehakadam.github.io/DateTimePicker/", - - "main":"dist/DateTimePicker.min.js", - - "repository": - { + "main": "dist/DateTimePicker.min.js", + "repository": { "type": "git", "url": "git://github.com:nehakadam/DateTimePicker.git" }, - - "devDependencies": - { + "devDependencies": { "grunt": "~0.4.5", "grunt-contrib-cssmin": "~0.5.0", "grunt-contrib-uglify": "~0.4.0", "grunt-contrib-copy": "~0.4.0", "grunt-contrib-concat": "^0.5.0", - "grunt-contrib-jshint": "^0.11.0", "grunt-contrib-csslint": "^0.5.0" }, - - "peerDependencies": - { + "peerDependencies": { "jquery": ">=1.0.0" }, - - "scripts": - { + "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, - "license": "MIT" } diff --git a/src/DateTimePicker-Zepto.js b/src/DateTimePicker-Zepto.js index 636fd72..0e6cd7f 100755 --- a/src/DateTimePicker-Zepto.js +++ b/src/DateTimePicker-Zepto.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.17 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://nehakadam.github.io/DateTimePicker Documentation : https://github.com/nehakadam/DateTimePicker diff --git a/src/DateTimePicker-ltie9.css b/src/DateTimePicker-ltie9.css index 2f65bf2..b0fbd70 100755 --- a/src/DateTimePicker-ltie9.css +++ b/src/DateTimePicker-ltie9.css @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/DateTimePicker-ltie9.js b/src/DateTimePicker-ltie9.js index b166570..3c9ffac 100755 --- a/src/DateTimePicker-ltie9.js +++ b/src/DateTimePicker-ltie9.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/DateTimePicker.css b/src/DateTimePicker.css index af0338f..afbe65f 100755 --- a/src/DateTimePicker.css +++ b/src/DateTimePicker.css @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/DateTimePicker.js b/src/DateTimePicker.js index e1570d5..2adceeb 100755 --- a/src/DateTimePicker.js +++ b/src/DateTimePicker.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/DateTimePicker_iOS_fix.js b/src/DateTimePicker_iOS_fix.js index 33e230f..73f5e78 100644 --- a/src/DateTimePicker_iOS_fix.js +++ b/src/DateTimePicker_iOS_fix.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-cs.js b/src/i18n/DateTimePicker-i18n-cs.js index 0084703..5daf377 100755 --- a/src/i18n/DateTimePicker-i18n-cs.js +++ b/src/i18n/DateTimePicker-i18n-cs.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-de.js b/src/i18n/DateTimePicker-i18n-de.js index 373abd3..fb3b5d1 100755 --- a/src/i18n/DateTimePicker-i18n-de.js +++ b/src/i18n/DateTimePicker-i18n-de.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-en.js b/src/i18n/DateTimePicker-i18n-en.js index f905fe1..006d198 100755 --- a/src/i18n/DateTimePicker-i18n-en.js +++ b/src/i18n/DateTimePicker-i18n-en.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-es.js b/src/i18n/DateTimePicker-i18n-es.js index 6134128..133f96d 100644 --- a/src/i18n/DateTimePicker-i18n-es.js +++ b/src/i18n/DateTimePicker-i18n-es.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-fr.js b/src/i18n/DateTimePicker-i18n-fr.js index 990eb3b..6673626 100755 --- a/src/i18n/DateTimePicker-i18n-fr.js +++ b/src/i18n/DateTimePicker-i18n-fr.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-it.js b/src/i18n/DateTimePicker-i18n-it.js index d4f0c63..78d515d 100644 --- a/src/i18n/DateTimePicker-i18n-it.js +++ b/src/i18n/DateTimePicker-i18n-it.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-ja.js b/src/i18n/DateTimePicker-i18n-ja.js index 218ae3e..40325d9 100755 --- a/src/i18n/DateTimePicker-i18n-ja.js +++ b/src/i18n/DateTimePicker-i18n-ja.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-ko.js b/src/i18n/DateTimePicker-i18n-ko.js index b5ae224..89b9b84 100755 --- a/src/i18n/DateTimePicker-i18n-ko.js +++ b/src/i18n/DateTimePicker-i18n-ko.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-nb.js b/src/i18n/DateTimePicker-i18n-nb.js index 93d64b1..53694ee 100644 --- a/src/i18n/DateTimePicker-i18n-nb.js +++ b/src/i18n/DateTimePicker-i18n-nb.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-nl.js b/src/i18n/DateTimePicker-i18n-nl.js index 427750a..49a1302 100644 --- a/src/i18n/DateTimePicker-i18n-nl.js +++ b/src/i18n/DateTimePicker-i18n-nl.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-ro.js b/src/i18n/DateTimePicker-i18n-ro.js index 176bbc7..b9cda21 100644 --- a/src/i18n/DateTimePicker-i18n-ro.js +++ b/src/i18n/DateTimePicker-i18n-ro.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-ru.js b/src/i18n/DateTimePicker-i18n-ru.js index 6530276..90f60fe 100644 --- a/src/i18n/DateTimePicker-i18n-ru.js +++ b/src/i18n/DateTimePicker-i18n-ru.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-uk.js b/src/i18n/DateTimePicker-i18n-uk.js index 557e6e7..63160a2 100644 --- a/src/i18n/DateTimePicker-i18n-uk.js +++ b/src/i18n/DateTimePicker-i18n-uk.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-zh-TW.js b/src/i18n/DateTimePicker-i18n-zh-TW.js index 4f6a5fb..5f9be8e 100755 --- a/src/i18n/DateTimePicker-i18n-zh-TW.js +++ b/src/i18n/DateTimePicker-i18n-zh-TW.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n.js b/src/i18n/DateTimePicker-i18n.js index d62bf44..fa3c85f 100755 --- a/src/i18n/DateTimePicker-i18n.js +++ b/src/i18n/DateTimePicker-i18n.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker diff --git a/src/i18n/DatetimePicker-i18n-zh-CN.js b/src/i18n/DatetimePicker-i18n-zh-CN.js index af94280..21f866d 100644 --- a/src/i18n/DatetimePicker-i18n-zh-CN.js +++ b/src/i18n/DatetimePicker-i18n-zh-CN.js @@ -2,7 +2,7 @@ jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile Version 0.1.38 - Copyright (c)2017 Lajpat Shah + Copyright (c)2014-2019 Lajpat Shah Contributors : https://github.com/nehakadam/DateTimePicker/contributors Repository : https://github.com/nehakadam/DateTimePicker Documentation : https://nehakadam.github.io/DateTimePicker