From d5327f63b5fb4699585bd9e4559ba30208d23ebf Mon Sep 17 00:00:00 2001 From: Neha Kadam Date: Sat, 2 Jul 2016 10:57:50 +0530 Subject: [PATCH] Italiano Locale and TouchHold Increment/Decrement * Added Italiano Locale files. * Added functionality to increment or decrement values of dates by holding Increment or Decrement buttons. This will make DateTimePicker more useful on mobile devices. Example - [Mobile-TouchHold.htm](https://github.com/CuriousSolutions/DateTimePicker/tree/master/demo/Mobile-TouchHold.htm) --- DateTimePicker.jquery.json | 2 +- bower.json | 2 +- demo/Mobile-TouchHold.htm | 74 ++++++ dist/DateTimePicker-ltie9.css | 2 +- dist/DateTimePicker-ltie9.js | 2 +- dist/DateTimePicker-ltie9.min.css | 2 +- dist/DateTimePicker-ltie9.min.js | 2 +- dist/DateTimePicker.css | 2 +- dist/DateTimePicker.js | 317 ++++++++++++++++++------- dist/DateTimePicker.min.css | 2 +- dist/DateTimePicker.min.js | 6 +- dist/i18n/DateTimePicker-i18n-de.js | 2 +- dist/i18n/DateTimePicker-i18n-en.js | 2 +- dist/i18n/DateTimePicker-i18n-es.js | 2 +- dist/i18n/DateTimePicker-i18n-fr.js | 2 +- dist/i18n/DateTimePicker-i18n-it.js | 42 ++++ dist/i18n/DateTimePicker-i18n-ja.js | 2 +- dist/i18n/DateTimePicker-i18n-nb.js | 2 +- dist/i18n/DateTimePicker-i18n-nl.js | 2 +- dist/i18n/DateTimePicker-i18n-ro.js | 2 +- dist/i18n/DateTimePicker-i18n-ru.js | 2 +- dist/i18n/DateTimePicker-i18n-uk.js | 2 +- dist/i18n/DateTimePicker-i18n-zh-TW.js | 2 +- dist/i18n/DateTimePicker-i18n.js | 38 ++- dist/i18n/DatetimePicker-i18n-zh-CN.js | 2 +- package.json | 2 +- src/DateTimePicker-ltie9.css | 2 +- src/DateTimePicker-ltie9.js | 2 +- src/DateTimePicker.css | 2 +- src/DateTimePicker.js | 317 ++++++++++++++++++------- src/i18n/DateTimePicker-i18n-de.js | 2 +- src/i18n/DateTimePicker-i18n-en.js | 2 +- src/i18n/DateTimePicker-i18n-es.js | 2 +- src/i18n/DateTimePicker-i18n-fr.js | 2 +- src/i18n/DateTimePicker-i18n-it.js | 42 ++++ src/i18n/DateTimePicker-i18n-ja.js | 2 +- src/i18n/DateTimePicker-i18n-nb.js | 2 +- src/i18n/DateTimePicker-i18n-nl.js | 2 +- src/i18n/DateTimePicker-i18n-ro.js | 2 +- src/i18n/DateTimePicker-i18n-ru.js | 2 +- src/i18n/DateTimePicker-i18n-uk.js | 2 +- src/i18n/DateTimePicker-i18n-zh-TW.js | 2 +- src/i18n/DateTimePicker-i18n.js | 38 ++- src/i18n/DatetimePicker-i18n-zh-CN.js | 2 +- 44 files changed, 737 insertions(+), 209 deletions(-) create mode 100644 demo/Mobile-TouchHold.htm create mode 100644 dist/i18n/DateTimePicker-i18n-it.js create mode 100644 src/i18n/DateTimePicker-i18n-it.js diff --git a/DateTimePicker.jquery.json b/DateTimePicker.jquery.json index c48ce79..3023da0 100755 --- a/DateTimePicker.jquery.json +++ b/DateTimePicker.jquery.json @@ -29,7 +29,7 @@ "docs": "http://curioussolutions.github.io/DateTimePicker/", - "version": "0.1.29", + "version": "0.1.30", "licenses": [ { diff --git a/bower.json b/bower.json index af0171f..3f5721c 100644 --- a/bower.json +++ b/bower.json @@ -15,7 +15,7 @@ "input" ], - "version": "0.1.29", + "version": "0.1.30", "homepage": "http://curioussolutions.github.io/DateTimePicker/", diff --git a/demo/Mobile-TouchHold.htm b/demo/Mobile-TouchHold.htm new file mode 100644 index 0000000..59478c2 --- /dev/null +++ b/demo/Mobile-TouchHold.htm @@ -0,0 +1,74 @@ + + + + + + + TouchHold Gesture Example + + + + + + + + + + + + + + + + +

Date :

+ + +

Time :

+ + +

DateTime :

+ + + + +
+ + + + + + + + \ No newline at end of file diff --git a/dist/DateTimePicker-ltie9.css b/dist/DateTimePicker-ltie9.css index 2dbb47d..4a02ad3 100755 --- a/dist/DateTimePicker-ltie9.css +++ b/dist/DateTimePicker-ltie9.css @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/dist/DateTimePicker-ltie9.js b/dist/DateTimePicker-ltie9.js index 2e5d75b..4b7ec7d 100755 --- a/dist/DateTimePicker-ltie9.js +++ b/dist/DateTimePicker-ltie9.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/dist/DateTimePicker-ltie9.min.css b/dist/DateTimePicker-ltie9.min.css index 463041e..4886052 100644 --- a/dist/DateTimePicker-ltie9.min.css +++ b/dist/DateTimePicker-ltie9.min.css @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/dist/DateTimePicker-ltie9.min.js b/dist/DateTimePicker-ltie9.min.js index 3ca3ed6..66d774a 100644 --- a/dist/DateTimePicker-ltie9.min.js +++ b/dist/DateTimePicker-ltie9.min.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/dist/DateTimePicker.css b/dist/DateTimePicker.css index 3e84085..98520cd 100755 --- a/dist/DateTimePicker.css +++ b/dist/DateTimePicker.css @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/dist/DateTimePicker.js b/dist/DateTimePicker.js index 8f20e69..0d5dcea 100644 --- a/dist/DateTimePicker.js +++ b/dist/DateTimePicker.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker @@ -62,6 +62,9 @@ $.DateTimePicker = $.DateTimePicker || { setValueInTextboxOnEveryClick: false, animationDuration: 400, + + touchHoldInterval: 300, // in Milliseconds + captureTouchHold: false, // capture Touch Hold Event isPopup: true, parentElement: "body", @@ -79,7 +82,7 @@ $.DateTimePicker = $.DateTimePicker || { formatHumanDate: null, // formatHumanDate(oDateTime, sMode, sFormat) parseDateTimeString: null, // parseDateTimeString(sDateTime, sMode, oInputField) - formatDateTimeString: null, // formatDateTimeString(oDateTime, sMode, oInputField) + formatDateTimeString: null // formatDateTimeString(oDateTime, sMode, oInputField) }, dataObject: // Temporary Variables For Calculation Specific to DateTimePicker Instance @@ -116,7 +119,11 @@ $.DateTimePicker = $.DateTimePicker || { iTabIndex: 0, bElemFocused: false, - bIs12Hour: false + bIs12Hour: false, + + sTouchButton: null, + iTouchStart: null, + oTimeInterval: null } }; @@ -1548,89 +1555,106 @@ $.cf = { // ---------------------------------------------------------------------------- - $(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) + if(oDTP.settings.captureTouchHold) { - 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(); - }); + $(".dtpicker-cont *").on('touchstart touchmove touchend', function(e) + { + oDTP._clearIntervalForTouchEvents(); + }); - $(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._bindTouchEvents("day"); + oDTP._bindTouchEvents("month"); + oDTP._bindTouchEvents("year"); + oDTP._bindTouchEvents("hour"); + oDTP._bindTouchEvents("minutes"); + oDTP._bindTouchEvents("seconds"); + } + else { - oDTP.oData.iCurrentSeconds -= oDTP.settings.secondsInterval; - oDTP._setCurrentDate(); - oDTP._setOutputOnIncrementOrDecrement(); - }); + $(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) { @@ -1643,7 +1667,7 @@ $.cf = { { oDTP.oData.sCurrentMeridiem = "AM"; oDTP.oData.iCurrentHour -= 12; - } + } oDTP._setCurrentDate(); oDTP._setOutputOnIncrementOrDecrement(); }); @@ -1703,6 +1727,131 @@ $.cf = { return sElemValue; }, + + _bindTouchEvents: function(type) + { + var oDTP = this; + + $(oDTP.element).find("." + type + " .increment, ." + type + " .increment *").on('touchstart', 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', function(e) + { + e.stopPropagation(); + oDTP._clearIntervalForTouchEvents(); + }); + + $(oDTP.element).find("." + type + " .decrement, ." + type + " .decrement *").on('touchstart', 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', function(e) + { + e.stopPropagation(); + oDTP._clearIntervalForTouchEvents(); + }); + }, + + _setIntervalForTouchEvents: function() + { + var oDTP = this; + + if(!$.cf._isValid(oDTP.oData.oTimeInterval)) + { + var iDiff; + + oDTP.oData.oTimeInterval = setInterval(function() + { + iDiff = ((new Date()).getTime() - oDTP.oData.iTouchStart); + if(iDiff > oDTP.settings.touchHoldInterval && $.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(); + } + }, oDTP.settings.touchHoldInterval); + } + }, + + _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; + }, //----------------------------------------------------------------- diff --git a/dist/DateTimePicker.min.css b/dist/DateTimePicker.min.css index ca12127..3c7eeda 100644 --- a/dist/DateTimePicker.min.css +++ b/dist/DateTimePicker.min.css @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/dist/DateTimePicker.min.js b/dist/DateTimePicker.min.js index 8d07225..9bdb6be 100644 --- a/dist/DateTimePicker.min.js +++ b/dist/DateTimePicker.min.js @@ -1,12 +1,12 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker ----------------------------------------------------------------------------- */ -$.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,titleContentDate:"Set Date",titleContentTime:"Set Time",titleContentDateTime:"Set Date & Time",buttonsToDisplay:["HeaderCloseButton","SetButton","ClearButton"],setButtonContent:"Set",clearButtonContent:"Clear",incrementButtonContent:"+",decrementButtonContent:"-",setValueInTextboxOnEveryClick:!1,animationDuration:400,isPopup:!0,parentElement:"body",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}},$.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()?!0:!1}},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"),a(document).unbind("keydown.DateTimePicker"),a(document).unbind("keyup.DateTimePicker"),a(this).children().remove(),a(this).removeData(),a(this).unbind(),a(this).removeClass("dtpicker-overlay dtpicker-mobile"),f=f[e],console.log("Destroyed DateTimePicker Object"),console.log(f);break}}else console.log("No DateTimePicker Object Defined For This Element");else if("object"===c)if(g.length>0){for(d in g)if(e=g[d],-1!==e.search("plugin_DateTimePicker"))return f[e]}else console.log("No DateTimePicker Object Defined For This Element")},b.prototype={init:function(){var b=this;b._setDateFormatArray(),b._setTimeFormatArray(),b._setDateTimeFormatArray(),b.settings.isPopup&&(b._createPicker(),a(b.element).addClass("dtpicker-mobile")),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)},_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;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;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),a(b.settings.parentElement).on("focus",c,{obj:b},b._inputFieldFocus),a(b.settings.parentElement).off("click",c,b._inputFieldClick),a(b.settings.parentElement).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,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._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._hidePicker(0)):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,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.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._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&&c.setIsPopup(a.cf._compare(h,"Popup")?!0:!1),!c.settings.isPopup){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,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.oData.dCurrentDate=c.settings.parseDateTimeString?c.settings.parseDateTimeString.call(c,k,d,a(b)):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,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.oData.dCurrentDate=c.settings.parseDateTimeString?c.settings.parseDateTimeString.call(c,k,d,a(b)):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,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.oData.dCurrentDate=c.settings.parseDateTimeString?c.settings.parseDateTimeString.call(c,k,d,a(b)):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"),a(document).unbind("keydown.DateTimePicker"),a(document).unbind("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.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;c>f;f++){var m=e[f];l+="
",l+="
",l+=""+d.settings.incrementButtonContent+"",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=this;a(document).on("click.DateTimePicker",function(a){b._hidePicker("")}),a(document).on("keydown.DateTimePicker",function(c){return a(".dtpicker-compValue").is(":focus")||9!==parseInt(c.keyCode?c.keyCode:c.which)?void 0:(b._setButtonAction(!0),a("[tabIndex="+(b.oData.iTabIndex+1)+"]").focus(),!1)}),a(document).on("keydown.DateTimePicker",function(c){a(".dtpicker-compValue").is(":focus")||9===parseInt(c.keyCode?c.keyCode:c.which)||b._hidePicker("")}),a(".dtpicker-cont *").click(function(a){a.stopPropagation()}),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(){b.oData.bElemFocused=!0,a(this).select()}),a(".dtpicker-compValue").blur(function(){b._getValuesFromInputBoxes(),b._setCurrentDate(),b.oData.bElemFocused=!1;var c=a(this).parent().parent();setTimeout(function(){c.is(":last-child")&&!b.oData.bElemFocused&&b._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(b.element).find(".dtpicker-close").click(function(a){b.settings.buttonClicked&&b.settings.buttonClicked.call(b,"CLOSE",b.oData.oInputElement),b._hidePicker("")}),a(b.element).find(".dtpicker-buttonSet").click(function(a){b.settings.buttonClicked&&b.settings.buttonClicked.call(b,"SET",b.oData.oInputElement),b._setButtonAction(!1)}),a(b.element).find(".dtpicker-buttonClear").click(function(a){b.settings.buttonClicked&&b.settings.buttonClicked.call(b,"CLEAR",b.oData.oInputElement),b._clearButtonAction()}),a(b.element).find(".day .increment, .day .increment *").click(function(a){b.oData.iCurrentDay++,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".day .decrement, .day .decrement *").click(function(a){b.oData.iCurrentDay--,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".month .increment, .month .increment *").click(function(a){b.oData.iCurrentMonth++,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".month .decrement, .month .decrement *").click(function(a){b.oData.iCurrentMonth--,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".year .increment, .year .increment *").click(function(a){b.oData.iCurrentYear++,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".year .decrement, .year .decrement *").click(function(a){b.oData.iCurrentYear--,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".hour .increment, .hour .increment *").click(function(a){b.oData.iCurrentHour++,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".hour .decrement, .hour .decrement *").click(function(a){b.oData.iCurrentHour--,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".minutes .increment, .minutes .increment *").click(function(a){b.oData.iCurrentMinutes+=b.settings.minuteInterval,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".minutes .decrement, .minutes .decrement *").click(function(a){b.oData.iCurrentMinutes-=b.settings.minuteInterval,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".seconds .increment, .seconds .increment *").click(function(a){b.oData.iCurrentSeconds+=b.settings.secondsInterval,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".seconds .decrement, .seconds .decrement *").click(function(a){b.oData.iCurrentSeconds-=b.settings.secondsInterval,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".meridiem .dtpicker-compButton, .meridiem .dtpicker-compButton *").click(function(c){a.cf._compare(b.oData.sCurrentMeridiem,"AM")?(b.oData.sCurrentMeridiem="PM",b.oData.iCurrentHour+=12):a.cf._compare(b.oData.sCurrentMeridiem,"PM")&&(b.oData.sCurrentMeridiem="AM",b.oData.iCurrentHour-=12),b._setCurrentDate(),b._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},_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)){var h;h=b.split(c.oData.bArrMatchFormat[4]||c.oData.bArrMatchFormat[5]||c.oData.bArrMatchFormat[6]?c.settings.monthYearSeparator: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]))}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)&&(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:12>k&&a.cf._compare(d,"PM")&&(k+=12)),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)&&(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:12>m&&a.cf._compare(p,"PM")&&(m+=12))),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()c?"0"+c:c,e=m.iCurrentMonth,f=m.iCurrentMonth+1,f=10>f?"0"+f:f,g=l.settings.shortMonthNames[e],h=l.settings.fullMonthNames[e],d=m.iCurrentYear,i=m.iCurrentWeekday,j=l.settings.shortDayNames[i],k=l.settings.fullDayNames[i],{dd:c,MM:f,monthShort:g,month:h,yyyy:d,dayShort:j,day:k}},_formatTime:function(b){var c,d,e,f,g,h,i,j=this,k={};return a.cf._isValid(b)?k=a.extend({},b):(k.iCurrentHour=j.oData.iCurrentHour,k.iCurrentMinutes=j.oData.iCurrentMinutes,k.iCurrentSeconds=j.oData.iCurrentSeconds,k.sCurrentMeridiem=j.oData.sCurrentMeridiem),c=k.iCurrentHour,d=10>c?"0"+c:c,g=d,e=k.iCurrentHour,e>12&&(e-=12),"00"===g&&(e=12),f=10>e?"0"+e:e,j.oData.bIs12Hour&&(g=f),h=k.iCurrentMinutes,h=10>h?"0"+h:h,i=k.iCurrentSeconds,i=10>i?"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?"PM":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 +$.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,titleContentDate:"Set Date",titleContentTime:"Set Time",titleContentDateTime:"Set Date & Time",buttonsToDisplay:["HeaderCloseButton","SetButton","ClearButton"],setButtonContent:"Set",clearButtonContent:"Clear",incrementButtonContent:"+",decrementButtonContent:"-",setValueInTextboxOnEveryClick:!1,animationDuration:400,touchHoldInterval:300,captureTouchHold:!1,isPopup:!0,parentElement:"body",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}},$.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()?!0:!1}},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"),a(document).unbind("keydown.DateTimePicker"),a(document).unbind("keyup.DateTimePicker"),a(this).children().remove(),a(this).removeData(),a(this).unbind(),a(this).removeClass("dtpicker-overlay dtpicker-mobile"),f=f[e],console.log("Destroyed DateTimePicker Object"),console.log(f);break}}else console.log("No DateTimePicker Object Defined For This Element");else if("object"===c)if(g.length>0){for(d in g)if(e=g[d],-1!==e.search("plugin_DateTimePicker"))return f[e]}else console.log("No DateTimePicker Object Defined For This Element")},b.prototype={init:function(){var b=this;b._setDateFormatArray(),b._setTimeFormatArray(),b._setDateTimeFormatArray(),b.settings.isPopup&&(b._createPicker(),a(b.element).addClass("dtpicker-mobile")),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)},_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;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;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),a(b.settings.parentElement).on("focus",c,{obj:b},b._inputFieldFocus),a(b.settings.parentElement).off("click",c,b._inputFieldClick),a(b.settings.parentElement).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,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._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._hidePicker(0)):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,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.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._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&&c.setIsPopup(a.cf._compare(h,"Popup")?!0:!1),!c.settings.isPopup){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,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.oData.dCurrentDate=c.settings.parseDateTimeString?c.settings.parseDateTimeString.call(c,k,d,a(b)):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,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.oData.dCurrentDate=c.settings.parseDateTimeString?c.settings.parseDateTimeString.call(c,k,d,a(b)):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,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.oData.dCurrentDate=c.settings.parseDateTimeString?c.settings.parseDateTimeString.call(c,k,d,a(b)):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"),a(document).unbind("keydown.DateTimePicker"),a(document).unbind("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.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;c>f;f++){var m=e[f];l+="
",l+="
",l+=""+d.settings.incrementButtonContent+"",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=this;a(document).on("click.DateTimePicker",function(a){b._hidePicker("")}),a(document).on("keydown.DateTimePicker",function(c){return a(".dtpicker-compValue").is(":focus")||9!==parseInt(c.keyCode?c.keyCode:c.which)?void 0:(b._setButtonAction(!0),a("[tabIndex="+(b.oData.iTabIndex+1)+"]").focus(),!1)}),a(document).on("keydown.DateTimePicker",function(c){a(".dtpicker-compValue").is(":focus")||9===parseInt(c.keyCode?c.keyCode:c.which)||b._hidePicker("")}),a(".dtpicker-cont *").click(function(a){a.stopPropagation()}),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(){b.oData.bElemFocused=!0,a(this).select()}),a(".dtpicker-compValue").blur(function(){b._getValuesFromInputBoxes(),b._setCurrentDate(),b.oData.bElemFocused=!1;var c=a(this).parent().parent();setTimeout(function(){c.is(":last-child")&&!b.oData.bElemFocused&&b._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(b.element).find(".dtpicker-close").click(function(a){b.settings.buttonClicked&&b.settings.buttonClicked.call(b,"CLOSE",b.oData.oInputElement),b._hidePicker("")}),a(b.element).find(".dtpicker-buttonSet").click(function(a){b.settings.buttonClicked&&b.settings.buttonClicked.call(b,"SET",b.oData.oInputElement),b._setButtonAction(!1)}),a(b.element).find(".dtpicker-buttonClear").click(function(a){b.settings.buttonClicked&&b.settings.buttonClicked.call(b,"CLEAR",b.oData.oInputElement),b._clearButtonAction()}),b.settings.captureTouchHold?(a(".dtpicker-cont *").on("touchstart touchmove touchend",function(a){b._clearIntervalForTouchEvents()}),b._bindTouchEvents("day"),b._bindTouchEvents("month"),b._bindTouchEvents("year"),b._bindTouchEvents("hour"),b._bindTouchEvents("minutes"),b._bindTouchEvents("seconds")):(a(b.element).find(".day .increment, .day .increment *").click(function(a){b.oData.iCurrentDay++,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".day .decrement, .day .decrement *").click(function(a){b.oData.iCurrentDay--,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".month .increment, .month .increment *").click(function(a){b.oData.iCurrentMonth++,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".month .decrement, .month .decrement *").click(function(a){b.oData.iCurrentMonth--,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".year .increment, .year .increment *").click(function(a){b.oData.iCurrentYear++,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".year .decrement, .year .decrement *").click(function(a){b.oData.iCurrentYear--,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".hour .increment, .hour .increment *").click(function(a){b.oData.iCurrentHour++,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".hour .decrement, .hour .decrement *").click(function(a){b.oData.iCurrentHour--,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".minutes .increment, .minutes .increment *").click(function(a){b.oData.iCurrentMinutes+=b.settings.minuteInterval,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".minutes .decrement, .minutes .decrement *").click(function(a){b.oData.iCurrentMinutes-=b.settings.minuteInterval,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".seconds .increment, .seconds .increment *").click(function(a){b.oData.iCurrentSeconds+=b.settings.secondsInterval,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()}),a(b.element).find(".seconds .decrement, .seconds .decrement *").click(function(a){b.oData.iCurrentSeconds-=b.settings.secondsInterval,b._setCurrentDate(),b._setOutputOnIncrementOrDecrement()})),a(b.element).find(".meridiem .dtpicker-compButton, .meridiem .dtpicker-compButton *").click(function(c){a.cf._compare(b.oData.sCurrentMeridiem,"AM")?(b.oData.sCurrentMeridiem="PM",b.oData.iCurrentHour+=12):a.cf._compare(b.oData.sCurrentMeridiem,"PM")&&(b.oData.sCurrentMeridiem="AM",b.oData.iCurrentHour-=12),b._setCurrentDate(),b._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",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",function(a){a.stopPropagation(),c._clearIntervalForTouchEvents()}),a(c.element).find("."+b+" .decrement, ."+b+" .decrement *").on("touchstart",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",function(a){a.stopPropagation(),c._clearIntervalForTouchEvents()})},_setIntervalForTouchEvents:function(){var b=this;if(!a.cf._isValid(b.oData.oTimeInterval)){var c;b.oData.oTimeInterval=setInterval(function(){c=(new Date).getTime()-b.oData.iTouchStart,c>b.settings.touchHoldInterval&&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())},b.settings.touchHoldInterval)}},_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},_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)){var h;h=b.split(c.oData.bArrMatchFormat[4]||c.oData.bArrMatchFormat[5]||c.oData.bArrMatchFormat[6]?c.settings.monthYearSeparator: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]))}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)&&(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:12>k&&a.cf._compare(d,"PM")&&(k+=12)),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)&&(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:12>m&&a.cf._compare(p,"PM")&&(m+=12))),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()c?"0"+c:c,e=m.iCurrentMonth,f=m.iCurrentMonth+1,f=10>f?"0"+f:f,g=l.settings.shortMonthNames[e],h=l.settings.fullMonthNames[e],d=m.iCurrentYear,i=m.iCurrentWeekday,j=l.settings.shortDayNames[i],k=l.settings.fullDayNames[i],{dd:c,MM:f,monthShort:g,month:h,yyyy:d,dayShort:j,day:k}},_formatTime:function(b){var c,d,e,f,g,h,i,j=this,k={};return a.cf._isValid(b)?k=a.extend({},b):(k.iCurrentHour=j.oData.iCurrentHour,k.iCurrentMinutes=j.oData.iCurrentMinutes,k.iCurrentSeconds=j.oData.iCurrentSeconds,k.sCurrentMeridiem=j.oData.sCurrentMeridiem),c=k.iCurrentHour,d=10>c?"0"+c:c,g=d,e=k.iCurrentHour,e>12&&(e-=12),"00"===g&&(e=12),f=10>e?"0"+e:e,j.oData.bIs12Hour&&(g=f),h=k.iCurrentMinutes,h=10>h?"0"+h:h,i=k.iCurrentSeconds,i=10>i?"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?"PM":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/i18n/DateTimePicker-i18n-de.js b/dist/i18n/DateTimePicker-i18n-de.js index 57770fe..587ccbb 100644 --- a/dist/i18n/DateTimePicker-i18n-de.js +++ b/dist/i18n/DateTimePicker-i18n-de.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-en.js b/dist/i18n/DateTimePicker-i18n-en.js index b323cf8..398cd2c 100644 --- a/dist/i18n/DateTimePicker-i18n-en.js +++ b/dist/i18n/DateTimePicker-i18n-en.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-es.js b/dist/i18n/DateTimePicker-i18n-es.js index 310b9d2..690653a 100644 --- a/dist/i18n/DateTimePicker-i18n-es.js +++ b/dist/i18n/DateTimePicker-i18n-es.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-fr.js b/dist/i18n/DateTimePicker-i18n-fr.js index c4efbd8..f0f833c 100644 --- a/dist/i18n/DateTimePicker-i18n-fr.js +++ b/dist/i18n/DateTimePicker-i18n-fr.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-it.js b/dist/i18n/DateTimePicker-i18n-it.js new file mode 100644 index 0000000..9cd0dc0 --- /dev/null +++ b/dist/i18n/DateTimePicker-i18n-it.js @@ -0,0 +1,42 @@ +/* ----------------------------------------------------------------------------- + + jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile + Version 0.1.30 + Copyright (c)2016 Curious Solutions LLP and Neha Kadam + http://curioussolutions.github.io/DateTimePicker + https://github.com/CuriousSolutions/DateTimePicker + + ----------------------------------------------------------------------------- */ + +/* + + language: Italiano + file: DateTimePicker-i18n-it + author: Cristian Segattini + +*/ + + +(function ($) { + $.DateTimePicker.i18n["it"] = $.extend($.DateTimePicker.i18n["it"], { + + language: "it", + + dateTimeFormat: "dd-MM-yyyy HH:mm", + dateFormat: "dd-MM-yyyy", + timeFormat: "HH:mm", + + shortDayNames: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"], + fullDayNames: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"], + shortMonthNames: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"], + fullMonthNames: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], + + titleContentDate: "Imposta Data", + titleContentTime: "Imposta Ora", + titleContentDateTime: "Imposta Data & Ora", + + setButtonContent: "Imposta", + clearButtonContent: "Pulisci" + + }); +})(jQuery); diff --git a/dist/i18n/DateTimePicker-i18n-ja.js b/dist/i18n/DateTimePicker-i18n-ja.js index 8440e49..7f6772b 100755 --- a/dist/i18n/DateTimePicker-i18n-ja.js +++ b/dist/i18n/DateTimePicker-i18n-ja.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-nb.js b/dist/i18n/DateTimePicker-i18n-nb.js index 0dc3413..40664ae 100644 --- a/dist/i18n/DateTimePicker-i18n-nb.js +++ b/dist/i18n/DateTimePicker-i18n-nb.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-nl.js b/dist/i18n/DateTimePicker-i18n-nl.js index 95be4cf..f5e5c31 100644 --- a/dist/i18n/DateTimePicker-i18n-nl.js +++ b/dist/i18n/DateTimePicker-i18n-nl.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-ro.js b/dist/i18n/DateTimePicker-i18n-ro.js index 88d337a..e2c4261 100644 --- a/dist/i18n/DateTimePicker-i18n-ro.js +++ b/dist/i18n/DateTimePicker-i18n-ro.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-ru.js b/dist/i18n/DateTimePicker-i18n-ru.js index ab68fd6..f704f77 100644 --- a/dist/i18n/DateTimePicker-i18n-ru.js +++ b/dist/i18n/DateTimePicker-i18n-ru.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-uk.js b/dist/i18n/DateTimePicker-i18n-uk.js index 3217eaa..6b744f4 100644 --- a/dist/i18n/DateTimePicker-i18n-uk.js +++ b/dist/i18n/DateTimePicker-i18n-uk.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n-zh-TW.js b/dist/i18n/DateTimePicker-i18n-zh-TW.js index 5a26c1c..2442915 100644 --- a/dist/i18n/DateTimePicker-i18n-zh-TW.js +++ b/dist/i18n/DateTimePicker-i18n-zh-TW.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/dist/i18n/DateTimePicker-i18n.js b/dist/i18n/DateTimePicker-i18n.js index 9679b84..68fa1b8 100644 --- a/dist/i18n/DateTimePicker-i18n.js +++ b/dist/i18n/DateTimePicker-i18n.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker @@ -174,6 +174,42 @@ +/* + + language: Italiano + file: DateTimePicker-i18n-it + author: Cristian Segattini + +*/ + + +(function ($) { + $.DateTimePicker.i18n["it"] = $.extend($.DateTimePicker.i18n["it"], { + + language: "it", + + dateTimeFormat: "dd-MM-yyyy HH:mm", + dateFormat: "dd-MM-yyyy", + timeFormat: "HH:mm", + + shortDayNames: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"], + fullDayNames: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"], + shortMonthNames: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"], + fullMonthNames: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], + + titleContentDate: "Imposta Data", + titleContentTime: "Imposta Ora", + titleContentDateTime: "Imposta Data & Ora", + + setButtonContent: "Imposta", + clearButtonContent: "Pulisci" + + }); +})(jQuery); + + + + /* language: Japanese diff --git a/dist/i18n/DatetimePicker-i18n-zh-CN.js b/dist/i18n/DatetimePicker-i18n-zh-CN.js index c515ad9..3336058 100644 --- a/dist/i18n/DatetimePicker-i18n-zh-CN.js +++ b/dist/i18n/DatetimePicker-i18n-zh-CN.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/package.json b/package.json index 22c002c..832316f 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "input" ], - "version": "0.1.29", + "version": "0.1.30", "homepage": "http://curioussolutions.github.io/DateTimePicker/", diff --git a/src/DateTimePicker-ltie9.css b/src/DateTimePicker-ltie9.css index 2dbb47d..4a02ad3 100755 --- a/src/DateTimePicker-ltie9.css +++ b/src/DateTimePicker-ltie9.css @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/src/DateTimePicker-ltie9.js b/src/DateTimePicker-ltie9.js index 2e5d75b..4b7ec7d 100755 --- a/src/DateTimePicker-ltie9.js +++ b/src/DateTimePicker-ltie9.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/src/DateTimePicker.css b/src/DateTimePicker.css index 3e84085..98520cd 100755 --- a/src/DateTimePicker.css +++ b/src/DateTimePicker.css @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/src/DateTimePicker.js b/src/DateTimePicker.js index 8f20e69..0d5dcea 100755 --- a/src/DateTimePicker.js +++ b/src/DateTimePicker.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker @@ -62,6 +62,9 @@ $.DateTimePicker = $.DateTimePicker || { setValueInTextboxOnEveryClick: false, animationDuration: 400, + + touchHoldInterval: 300, // in Milliseconds + captureTouchHold: false, // capture Touch Hold Event isPopup: true, parentElement: "body", @@ -79,7 +82,7 @@ $.DateTimePicker = $.DateTimePicker || { formatHumanDate: null, // formatHumanDate(oDateTime, sMode, sFormat) parseDateTimeString: null, // parseDateTimeString(sDateTime, sMode, oInputField) - formatDateTimeString: null, // formatDateTimeString(oDateTime, sMode, oInputField) + formatDateTimeString: null // formatDateTimeString(oDateTime, sMode, oInputField) }, dataObject: // Temporary Variables For Calculation Specific to DateTimePicker Instance @@ -116,7 +119,11 @@ $.DateTimePicker = $.DateTimePicker || { iTabIndex: 0, bElemFocused: false, - bIs12Hour: false + bIs12Hour: false, + + sTouchButton: null, + iTouchStart: null, + oTimeInterval: null } }; @@ -1548,89 +1555,106 @@ $.cf = { // ---------------------------------------------------------------------------- - $(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) + if(oDTP.settings.captureTouchHold) { - 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(); - }); + $(".dtpicker-cont *").on('touchstart touchmove touchend', function(e) + { + oDTP._clearIntervalForTouchEvents(); + }); - $(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._bindTouchEvents("day"); + oDTP._bindTouchEvents("month"); + oDTP._bindTouchEvents("year"); + oDTP._bindTouchEvents("hour"); + oDTP._bindTouchEvents("minutes"); + oDTP._bindTouchEvents("seconds"); + } + else { - oDTP.oData.iCurrentSeconds -= oDTP.settings.secondsInterval; - oDTP._setCurrentDate(); - oDTP._setOutputOnIncrementOrDecrement(); - }); + $(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) { @@ -1643,7 +1667,7 @@ $.cf = { { oDTP.oData.sCurrentMeridiem = "AM"; oDTP.oData.iCurrentHour -= 12; - } + } oDTP._setCurrentDate(); oDTP._setOutputOnIncrementOrDecrement(); }); @@ -1703,6 +1727,131 @@ $.cf = { return sElemValue; }, + + _bindTouchEvents: function(type) + { + var oDTP = this; + + $(oDTP.element).find("." + type + " .increment, ." + type + " .increment *").on('touchstart', 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', function(e) + { + e.stopPropagation(); + oDTP._clearIntervalForTouchEvents(); + }); + + $(oDTP.element).find("." + type + " .decrement, ." + type + " .decrement *").on('touchstart', 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', function(e) + { + e.stopPropagation(); + oDTP._clearIntervalForTouchEvents(); + }); + }, + + _setIntervalForTouchEvents: function() + { + var oDTP = this; + + if(!$.cf._isValid(oDTP.oData.oTimeInterval)) + { + var iDiff; + + oDTP.oData.oTimeInterval = setInterval(function() + { + iDiff = ((new Date()).getTime() - oDTP.oData.iTouchStart); + if(iDiff > oDTP.settings.touchHoldInterval && $.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(); + } + }, oDTP.settings.touchHoldInterval); + } + }, + + _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; + }, //----------------------------------------------------------------- diff --git a/src/i18n/DateTimePicker-i18n-de.js b/src/i18n/DateTimePicker-i18n-de.js index 57770fe..587ccbb 100755 --- a/src/i18n/DateTimePicker-i18n-de.js +++ b/src/i18n/DateTimePicker-i18n-de.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-en.js b/src/i18n/DateTimePicker-i18n-en.js index b323cf8..398cd2c 100755 --- a/src/i18n/DateTimePicker-i18n-en.js +++ b/src/i18n/DateTimePicker-i18n-en.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-es.js b/src/i18n/DateTimePicker-i18n-es.js index 310b9d2..690653a 100644 --- a/src/i18n/DateTimePicker-i18n-es.js +++ b/src/i18n/DateTimePicker-i18n-es.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-fr.js b/src/i18n/DateTimePicker-i18n-fr.js index c4efbd8..f0f833c 100755 --- a/src/i18n/DateTimePicker-i18n-fr.js +++ b/src/i18n/DateTimePicker-i18n-fr.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-it.js b/src/i18n/DateTimePicker-i18n-it.js new file mode 100644 index 0000000..9cd0dc0 --- /dev/null +++ b/src/i18n/DateTimePicker-i18n-it.js @@ -0,0 +1,42 @@ +/* ----------------------------------------------------------------------------- + + jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile + Version 0.1.30 + Copyright (c)2016 Curious Solutions LLP and Neha Kadam + http://curioussolutions.github.io/DateTimePicker + https://github.com/CuriousSolutions/DateTimePicker + + ----------------------------------------------------------------------------- */ + +/* + + language: Italiano + file: DateTimePicker-i18n-it + author: Cristian Segattini + +*/ + + +(function ($) { + $.DateTimePicker.i18n["it"] = $.extend($.DateTimePicker.i18n["it"], { + + language: "it", + + dateTimeFormat: "dd-MM-yyyy HH:mm", + dateFormat: "dd-MM-yyyy", + timeFormat: "HH:mm", + + shortDayNames: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"], + fullDayNames: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"], + shortMonthNames: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"], + fullMonthNames: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], + + titleContentDate: "Imposta Data", + titleContentTime: "Imposta Ora", + titleContentDateTime: "Imposta Data & Ora", + + setButtonContent: "Imposta", + clearButtonContent: "Pulisci" + + }); +})(jQuery); diff --git a/src/i18n/DateTimePicker-i18n-ja.js b/src/i18n/DateTimePicker-i18n-ja.js index 8440e49..7f6772b 100755 --- a/src/i18n/DateTimePicker-i18n-ja.js +++ b/src/i18n/DateTimePicker-i18n-ja.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-nb.js b/src/i18n/DateTimePicker-i18n-nb.js index 0dc3413..40664ae 100644 --- a/src/i18n/DateTimePicker-i18n-nb.js +++ b/src/i18n/DateTimePicker-i18n-nb.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-nl.js b/src/i18n/DateTimePicker-i18n-nl.js index 95be4cf..f5e5c31 100644 --- a/src/i18n/DateTimePicker-i18n-nl.js +++ b/src/i18n/DateTimePicker-i18n-nl.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-ro.js b/src/i18n/DateTimePicker-i18n-ro.js index 88d337a..e2c4261 100644 --- a/src/i18n/DateTimePicker-i18n-ro.js +++ b/src/i18n/DateTimePicker-i18n-ro.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-ru.js b/src/i18n/DateTimePicker-i18n-ru.js index ab68fd6..f704f77 100644 --- a/src/i18n/DateTimePicker-i18n-ru.js +++ b/src/i18n/DateTimePicker-i18n-ru.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-uk.js b/src/i18n/DateTimePicker-i18n-uk.js index 3217eaa..6b744f4 100644 --- a/src/i18n/DateTimePicker-i18n-uk.js +++ b/src/i18n/DateTimePicker-i18n-uk.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n-zh-TW.js b/src/i18n/DateTimePicker-i18n-zh-TW.js index 5a26c1c..2442915 100755 --- a/src/i18n/DateTimePicker-i18n-zh-TW.js +++ b/src/i18n/DateTimePicker-i18n-zh-TW.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker diff --git a/src/i18n/DateTimePicker-i18n.js b/src/i18n/DateTimePicker-i18n.js index 9679b84..68fa1b8 100755 --- a/src/i18n/DateTimePicker-i18n.js +++ b/src/i18n/DateTimePicker-i18n.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker @@ -174,6 +174,42 @@ +/* + + language: Italiano + file: DateTimePicker-i18n-it + author: Cristian Segattini + +*/ + + +(function ($) { + $.DateTimePicker.i18n["it"] = $.extend($.DateTimePicker.i18n["it"], { + + language: "it", + + dateTimeFormat: "dd-MM-yyyy HH:mm", + dateFormat: "dd-MM-yyyy", + timeFormat: "HH:mm", + + shortDayNames: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"], + fullDayNames: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"], + shortMonthNames: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"], + fullMonthNames: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], + + titleContentDate: "Imposta Data", + titleContentTime: "Imposta Ora", + titleContentDateTime: "Imposta Data & Ora", + + setButtonContent: "Imposta", + clearButtonContent: "Pulisci" + + }); +})(jQuery); + + + + /* language: Japanese diff --git a/src/i18n/DatetimePicker-i18n-zh-CN.js b/src/i18n/DatetimePicker-i18n-zh-CN.js index c515ad9..3336058 100644 --- a/src/i18n/DatetimePicker-i18n-zh-CN.js +++ b/src/i18n/DatetimePicker-i18n-zh-CN.js @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- jQuery DateTimePicker - Responsive flat design jQuery DateTime Picker plugin for Web & Mobile - Version 0.1.29 + Version 0.1.30 Copyright (c)2016 Curious Solutions LLP and Neha Kadam http://curioussolutions.github.io/DateTimePicker https://github.com/CuriousSolutions/DateTimePicker