diff --git a/Gruntfile.js b/Gruntfile.js index f7e29db..f541de2 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -12,7 +12,7 @@ module.exports = function (grunt) { jqueryVersionCheck: '+function ($) {\n' + ' var version = $.fn.jquery.split(\' \')[0].split(\'.\');\n' + ' if ((version[0] < 2 && version[1] < 9) || (version[0] === 1 && version[1] === 9 && version[2] < 1) || (version[0] >= 4)) {\n' + - ' throw new Error(\'Tempus Dominus Bootstrap4\\\'s requires at least jQuery v1.9.1 but less than v4.0.0\');\n' + + ' throw new Error(\'Tempus Dominus Bootstrap4\\\'s requires at least jQuery v3.0.0 but less than v4.0.0\');\n' + ' }\n' + '}(jQuery);\n\n', momentCheck: 'if (typeof moment === \'undefined\') {\n' + diff --git a/build/css/tempusdominus-bootstrap-4.css b/build/css/tempusdominus-bootstrap-4.css index a4f9a60..366b2ea 100644 --- a/build/css/tempusdominus-bootstrap-4.css +++ b/build/css/tempusdominus-bootstrap-4.css @@ -1,5 +1,5 @@ /*@preserve - * Tempus Dominus Bootstrap4 v5.0.0-alpha17 (https://tempusdominus.github.io/bootstrap-4/) + * Tempus Dominus Bootstrap4 v5.0.0-alpha18 (https://tempusdominus.github.io/bootstrap-4/) * Copyright 2016-2018 Jonathan Peterson * Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE) */ diff --git a/build/css/tempusdominus-bootstrap-4.min.css b/build/css/tempusdominus-bootstrap-4.min.css index a4f9a60..366b2ea 100644 --- a/build/css/tempusdominus-bootstrap-4.min.css +++ b/build/css/tempusdominus-bootstrap-4.min.css @@ -1,5 +1,5 @@ /*@preserve - * Tempus Dominus Bootstrap4 v5.0.0-alpha17 (https://tempusdominus.github.io/bootstrap-4/) + * Tempus Dominus Bootstrap4 v5.0.0-alpha18 (https://tempusdominus.github.io/bootstrap-4/) * Copyright 2016-2018 Jonathan Peterson * Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE) */ diff --git a/build/js/tempusdominus-bootstrap-4.js b/build/js/tempusdominus-bootstrap-4.js index 23b7a71..756f487 100644 --- a/build/js/tempusdominus-bootstrap-4.js +++ b/build/js/tempusdominus-bootstrap-4.js @@ -1,5 +1,5 @@ /*@preserve - * Tempus Dominus Bootstrap4 v5.0.0-alpha17 (https://tempusdominus.github.io/bootstrap-4/) + * Tempus Dominus Bootstrap4 v5.0.0-alpha18 (https://tempusdominus.github.io/bootstrap-4/) * Copyright 2016-2018 Jonathan Peterson * Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE) */ @@ -11,7 +11,7 @@ if (typeof jQuery === 'undefined') { +function ($) { var version = $.fn.jquery.split(' ')[0].split('.'); if ((version[0] < 2 && version[1] < 9) || (version[0] === 1 && version[1] === 9 && version[2] < 1) || (version[0] >= 4)) { - throw new Error('Tempus Dominus Bootstrap4\'s requires at least jQuery v1.9.1 but less than v4.0.0'); + throw new Error('Tempus Dominus Bootstrap4\'s requires at least jQuery v3.0.0 but less than v4.0.0'); } }(jQuery); @@ -38,12 +38,13 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function" function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } // ReSharper disable once InconsistentNaming -var DateTimePicker = function ($, moment) { +var DateTimePicker = function ($) { // ReSharper disable InconsistentNaming var NAME = 'datetimepicker', - VERSION = '5.0.0-alpha15', + VERSION = '5.0.0-alpha7', DATA_KEY = '' + NAME, EVENT_KEY = '.' + DATA_KEY, + EMIT_EVENT_KEY = DATA_KEY + '.', DATA_API_KEY = '.data-api', Selector = { DATA_TOGGLE: '[data-toggle="' + DATA_KEY + '"]' @@ -59,63 +60,11 @@ var DateTimePicker = function ($, moment) { FOCUS: 'focus' + EVENT_KEY, CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY, //emitted - UPDATE: 'update' + EVENT_KEY, - ERROR: 'error' + EVENT_KEY, - HIDE: 'hide' + EVENT_KEY, - SHOW: 'show' + EVENT_KEY + UPDATE: EMIT_EVENT_KEY + 'update', + ERROR: EMIT_EVENT_KEY + 'error', + HIDE: EMIT_EVENT_KEY + 'hide', + SHOW: EMIT_EVENT_KEY + 'show' }, - DatePickerModes = [{ - CLASS_NAME: 'days', - NAV_FUNCTION: 'M', - NAV_STEP: 1 - }, { - CLASS_NAME: 'months', - NAV_FUNCTION: 'y', - NAV_STEP: 1 - }, { - CLASS_NAME: 'years', - NAV_FUNCTION: 'y', - NAV_STEP: 10 - }, { - CLASS_NAME: 'decades', - NAV_FUNCTION: 'y', - NAV_STEP: 100 - }], - KeyMap = { - 'up': 38, - 38: 'up', - 'down': 40, - 40: 'down', - 'left': 37, - 37: 'left', - 'right': 39, - 39: 'right', - 'tab': 9, - 9: 'tab', - 'escape': 27, - 27: 'escape', - 'enter': 13, - 13: 'enter', - 'pageUp': 33, - 33: 'pageUp', - 'pageDown': 34, - 34: 'pageDown', - 'shift': 16, - 16: 'shift', - 'control': 17, - 17: 'control', - 'space': 32, - 32: 'space', - 't': 84, - 84: 't', - 'delete': 46, - 46: 'delete' - }, - ViewModes = ['times', 'days', 'months', 'years', 'decades'], - keyState = {}, - keyPressHandled = {}; - - var MinViewModeNumber = 0, Default = { timeZone: '', format: false, @@ -126,7 +75,7 @@ var DateTimePicker = function ($, moment) { maxDate: false, useCurrent: true, collapse: true, - locale: moment.locale(), + locale: window.moment.locale(), defaultDate: false, disabledDates: false, enabledDates: false, @@ -320,8 +269,59 @@ var DateTimePicker = function ($, moment) { viewDate: false, allowMultidate: false, multidateSeparator: ',' - }; + }, + DatePickerModes = [{ + CLASS_NAME: 'days', + NAV_FUNCTION: 'M', + NAV_STEP: 1 + }, { + CLASS_NAME: 'months', + NAV_FUNCTION: 'y', + NAV_STEP: 1 + }, { + CLASS_NAME: 'years', + NAV_FUNCTION: 'y', + NAV_STEP: 10 + }, { + CLASS_NAME: 'decades', + NAV_FUNCTION: 'y', + NAV_STEP: 100 + }], + KeyMap = { + 'up': 38, + 38: 'up', + 'down': 40, + 40: 'down', + 'left': 37, + 37: 'left', + 'right': 39, + 39: 'right', + 'tab': 9, + 9: 'tab', + 'escape': 27, + 27: 'escape', + 'enter': 13, + 13: 'enter', + 'pageUp': 33, + 33: 'pageUp', + 'pageDown': 34, + 34: 'pageDown', + 'shift': 16, + 16: 'shift', + 'control': 17, + 17: 'control', + 'space': 32, + 32: 'space', + 't': 84, + 84: 't', + 'delete': 46, + 46: 'delete' + }, + ViewModes = ['times', 'days', 'months', 'years', 'decades'], + keyState = {}, + keyPressHandled = {}; + var MinViewModeNumber = 0; // ReSharper restore InconsistentNaming // ReSharper disable once DeclarationHides @@ -380,9 +380,9 @@ var DateTimePicker = function ($, moment) { this._initFormatting(); if (this.input !== undefined && this.input.is('input') && this.input.val().trim().length !== 0) { - this._setValue(this._parseInputDate(this.input.val().trim()), 0); + this._setValue(this._parseInputDate(this.input.val().trim())); } else if (this._options.defaultDate && this.input !== undefined && this.input.attr('placeholder') === undefined) { - this._setValue(this._options.defaultDate, 0); + this._setValue(this._options.defaultDate); } if (this._options.inline) { this.show(); @@ -499,7 +499,7 @@ var DateTimePicker = function ($, moment) { }; DateTimePicker.prototype._hasTimeZone = function _hasTimeZone() { - return moment.tz !== undefined && this._options.timeZone !== undefined && this._options.timeZone !== null && this._options.timeZone !== ''; + return window.moment.tz !== undefined && this._options.timeZone !== undefined && this._options.timeZone !== null && this._options.timeZone !== ''; }; DateTimePicker.prototype._isEnabled = function _isEnabled(granularity) { @@ -520,9 +520,6 @@ var DateTimePicker = function ($, moment) { return this.actualFormat.indexOf('m') !== -1; case 's': return this.actualFormat.indexOf('s') !== -1; - case 'a': - case 'A': - return this.actualFormat.toLowerCase().indexOf('a') !== -1; default: return false; } @@ -641,7 +638,7 @@ var DateTimePicker = function ($, moment) { DateTimePicker.prototype._parseInputDate = function _parseInputDate(inputDate) { if (this._options.parseInputDate === undefined) { - if (!moment.isMoment(inputDate)) { + if (!window.moment.isMoment(inputDate)) { inputDate = this.getMoment(inputDate); } } else { @@ -785,13 +782,13 @@ var DateTimePicker = function ($, moment) { var returnMoment = void 0; if (d === undefined || d === null) { - returnMoment = moment(); //TODO should this use format? and locale? + returnMoment = window.moment(); //TODO should this use format? and locale? } else if (this._hasTimeZone()) { // There is a string to parse and a default time zone // parse with the tz function which takes a default time zone if it is not in the format string - returnMoment = moment.tz(d, this.parseFormats, this._options.useStrict, this._options.timeZone); + returnMoment = window.moment.tz(d, this.parseFormats, this._options.useStrict, this._options.timeZone); } else { - returnMoment = moment(d, this.parseFormats, this._options.useStrict); + returnMoment = window.moment(d, this.parseFormats, this._options.useStrict); } if (this._hasTimeZone()) { @@ -845,7 +842,7 @@ var DateTimePicker = function ($, moment) { } } - if (newDate !== null && typeof newDate !== 'string' && !moment.isMoment(newDate) && !(newDate instanceof Date)) { + if (newDate !== null && typeof newDate !== 'string' && !window.moment.isMoment(newDate) && !(newDate instanceof Date)) { throw new TypeError('date() parameter must be one of [null, string, moment or Date]'); } @@ -853,6 +850,9 @@ var DateTimePicker = function ($, moment) { }; DateTimePicker.prototype.format = function format(newFormat) { + ///test su + ///info about para + ///returns foo if (arguments.length === 0) { return this._options.format; } @@ -1093,7 +1093,7 @@ var DateTimePicker = function ($, moment) { return this._options.locale; } - if (!moment.localeData(_locale)) { + if (!window.moment.localeData(_locale)) { throw new TypeError('locale() locale ' + _locale + ' is not loaded from moment locales!'); } @@ -1465,7 +1465,7 @@ var DateTimePicker = function ($, moment) { return true; } - if (typeof newDate !== 'string' && !moment.isMoment(newDate) && !(newDate instanceof Date)) { + if (typeof newDate !== 'string' && !window.moment.isMoment(newDate) && !(newDate instanceof Date)) { throw new TypeError('viewDate() parameter must be one of [string, moment or Date]'); } @@ -1572,9 +1572,6 @@ var DateTimePicker = function ($, moment) { key: 'Default', get: function get() { return Default; - }, - set: function set(value) { - Default = value; } }, { key: 'ClassName', @@ -1587,7 +1584,7 @@ var DateTimePicker = function ($, moment) { }(); return DateTimePicker; -}(jQuery, moment); +}(jQuery); //noinspection JSUnusedGlobalSymbols /* global DateTimePicker */ diff --git a/build/js/tempusdominus-bootstrap-4.min.js b/build/js/tempusdominus-bootstrap-4.min.js index 50e3dd8..9f59763 100644 --- a/build/js/tempusdominus-bootstrap-4.min.js +++ b/build/js/tempusdominus-bootstrap-4.min.js @@ -1,7 +1,7 @@ /*@preserve - * Tempus Dominus Bootstrap4 v5.0.0-alpha17 (https://tempusdominus.github.io/bootstrap-4/) + * Tempus Dominus Bootstrap4 v5.0.0-alpha18 (https://tempusdominus.github.io/bootstrap-4/) * Copyright 2016-2018 Jonathan Peterson * Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE) */ -if("undefined"==typeof jQuery)throw new Error("Tempus Dominus Bootstrap4's requires jQuery. jQuery must be included before Tempus Dominus Bootstrap4's JavaScript.");if(+function(a){var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1===b[0]&&9===b[1]&&b[2]<1||b[0]>=4)throw new Error("Tempus Dominus Bootstrap4's requires at least jQuery v1.9.1 but less than v4.0.0")}(jQuery),"undefined"==typeof moment)throw new Error("Tempus Dominus Bootstrap4's requires moment.js. Moment.js must be included before Tempus Dominus Bootstrap4's JavaScript.");var version=moment.version.split(".");if(version[0]<=2&&version[1]<17||version[0]>=3)throw new Error("Tempus Dominus Bootstrap4's requires at least moment.js v2.17.0 but less than v3.0.0");+function(){function a(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function b(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){for(var c=0;c1){for(var e=0;e1)throw new TypeError("isEnabled expects a single character string parameter");switch(a){case"y":return this.actualFormat.indexOf("Y")!==-1;case"M":return this.actualFormat.indexOf("M")!==-1;case"d":return this.actualFormat.toLowerCase().indexOf("d")!==-1;case"h":case"H":return this.actualFormat.toLowerCase().indexOf("h")!==-1;case"m":return this.actualFormat.indexOf("m")!==-1;case"s":return this.actualFormat.indexOf("s")!==-1;case"a":case"A":return this.actualFormat.toLowerCase().indexOf("a")!==-1;default:return!1}},t.prototype._hasTime=function(){return this._isEnabled("h")||this._isEnabled("m")||this._isEnabled("s")},t.prototype._hasDate=function(){return this._isEnabled("y")||this._isEnabled("M")||this._isEnabled("d")},t.prototype._dataToOptions=function(){var b=this._element.data(),c={};return b.dateOptions&&b.dateOptions instanceof Object&&(c=a.extend(!0,c,b.dateOptions)),a.each(this._options,function(a){var d="date"+a.charAt(0).toUpperCase()+a.slice(1);void 0!==b[d]?c[a]=b[d]:delete c[a]}),c},t.prototype._notifyEvent=function(a){a.type===t.Event.CHANGE&&a.date&&a.date.isSame(a.oldDate)||!a.date&&!a.oldDate||this._element.trigger(a)},t.prototype._viewUpdate=function(a){"y"===a&&(a="YYYY"),this._notifyEvent({type:t.Event.UPDATE,change:a,viewDate:this._viewDate.clone()})},t.prototype._showMode=function(a){this.widget&&(a&&(this.currentViewMode=Math.max(r,Math.min(3,this.currentViewMode+a))),this.widget.find(".datepicker > div").hide().filter(".datepicker-"+m[this.currentViewMode].CLASS_NAME).show())},t.prototype._isInDisabledDates=function(a){return this._options.disabledDates[a.format("YYYY-MM-DD")]===!0},t.prototype._isInEnabledDates=function(a){return this._options.enabledDates[a.format("YYYY-MM-DD")]===!0},t.prototype._isInDisabledHours=function(a){return this._options.disabledHours[a.format("H")]===!0},t.prototype._isInEnabledHours=function(a){return this._options.enabledHours[a.format("H")]===!0},t.prototype._isValid=function(b,c){if(!b.isValid())return!1;if(this._options.disabledDates&&"d"===c&&this._isInDisabledDates(b))return!1;if(this._options.enabledDates&&"d"===c&&!this._isInEnabledDates(b))return!1;if(this._options.minDate&&b.isBefore(this._options.minDate,c))return!1;if(this._options.maxDate&&b.isAfter(this._options.maxDate,c))return!1;if(this._options.daysOfWeekDisabled&&"d"===c&&this._options.daysOfWeekDisabled.indexOf(b.day())!==-1)return!1;if(this._options.disabledHours&&("h"===c||"m"===c||"s"===c)&&this._isInDisabledHours(b))return!1;if(this._options.enabledHours&&("h"===c||"m"===c||"s"===c)&&!this._isInEnabledHours(b))return!1;if(this._options.disabledTimeIntervals&&("h"===c||"m"===c||"s"===c)){var d=!1;if(a.each(this._options.disabledTimeIntervals,function(){if(b.isBetween(this[0],this[1]))return d=!0,!1}),d)return!1}return!0},t.prototype._parseInputDate=function(a){return void 0===this._options.parseInputDate?b.isMoment(a)||(a=this.getMoment(a)):a=this._options.parseInputDate(a),a},t.prototype._keydown=function(a){var b=null,c=void 0,d=void 0,e=void 0,f=void 0,g=[],h={},i=a.which,j="p";p[i]=j;for(c in p)p.hasOwnProperty(c)&&p[c]===j&&(g.push(c),parseInt(c,10)!==i&&(h[c]=!0));for(c in this._options.keyBinds)if(this._options.keyBinds.hasOwnProperty(c)&&"function"==typeof this._options.keyBinds[c]&&(e=c.split(" "),e.length===g.length&&n[i]===e[e.length-1])){for(f=!0,d=e.length-2;d>=0;d--)if(!(n[e[d]]in h)){f=!1;break}if(f){b=this._options.keyBinds[c];break}}b&&b.call(this.widget)&&(a.stopPropagation(),a.preventDefault())},t.prototype._keyup=function(a){p[a.which]="r",q[a.which]&&(q[a.which]=!1,a.stopPropagation(),a.preventDefault())},t.prototype._indexGivenDates=function(b){var c={},d=this;return a.each(b,function(){var a=d._parseInputDate(this);a.isValid()&&(c[a.format("YYYY-MM-DD")]=!0)}),!!Object.keys(c).length&&c},t.prototype._indexGivenHours=function(b){var c={};return a.each(b,function(){c[this]=!0}),!!Object.keys(c).length&&c},t.prototype._initFormatting=function(){var a=this._options.format||"L LT",b=this;this.actualFormat=a.replace(/(\[[^\[]*])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(a){return b._dates[0].localeData().longDateFormat(a)||a}),this.parseFormats=this._options.extraFormats?this._options.extraFormats.slice():[],this.parseFormats.indexOf(a)<0&&this.parseFormats.indexOf(this.actualFormat)<0&&this.parseFormats.push(this.actualFormat),this.use24Hours=this.actualFormat.toLowerCase().indexOf("a")<1&&this.actualFormat.replace(/\[.*?]/g,"").indexOf("h")<1,this._isEnabled("y")&&(r=2),this._isEnabled("M")&&(r=1),this._isEnabled("d")&&(r=0),this.currentViewMode=Math.max(r,this.currentViewMode),this.unset||this._setValue(this._dates[0],0)},t.prototype._getLastPickedDate=function(){return this._dates[this._getLastPickedDateIndex()]},t.prototype._getLastPickedDateIndex=function(){return this._dates.length-1},t.prototype.getMoment=function(a){var c=void 0;return c=void 0===a||null===a?b():this._hasTimeZone()?b.tz(a,this.parseFormats,this._options.useStrict,this._options.timeZone):b(a,this.parseFormats,this._options.useStrict),this._hasTimeZone()&&c.tz(this._options.timeZone),c},t.prototype.toggle=function(){return this.widget?this.hide():this.show()},t.prototype.ignoreReadonly=function(a){if(0===arguments.length)return this._options.ignoreReadonly;if("boolean"!=typeof a)throw new TypeError("ignoreReadonly () expects a boolean parameter");this._options.ignoreReadonly=a},t.prototype.options=function(b){if(0===arguments.length)return a.extend(!0,{},this._options);if(!(b instanceof Object))throw new TypeError("options() this.options parameter should be an object");a.extend(!0,this._options,b);var c=this;a.each(this._options,function(a,b){void 0!==c[a]&&c[a](b)})},t.prototype.date=function(a,c){if(c=c||0,0===arguments.length)return this.unset?null:this._options.allowMultidate?this._dates.join(this._options.multidateSeparator):this._dates[c].clone();if(!(null===a||"string"==typeof a||b.isMoment(a)||a instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");this._setValue(null===a?null:this._parseInputDate(a),c)},t.prototype.format=function(a){if(0===arguments.length)return this._options.format;if("string"!=typeof a&&("boolean"!=typeof a||a!==!1))throw new TypeError("format() expects a string or boolean:false parameter "+a);this._options.format=a,this.actualFormat&&this._initFormatting()},t.prototype.timeZone=function(a){if(0===arguments.length)return this._options.timeZone;if("string"!=typeof a)throw new TypeError("newZone() expects a string parameter");this._options.timeZone=a},t.prototype.dayViewHeaderFormat=function(a){if(0===arguments.length)return this._options.dayViewHeaderFormat;if("string"!=typeof a)throw new TypeError("dayViewHeaderFormat() expects a string parameter");this._options.dayViewHeaderFormat=a},t.prototype.extraFormats=function(a){if(0===arguments.length)return this._options.extraFormats;if(a!==!1&&!(a instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");this._options.extraFormats=a,this.parseFormats&&this._initFormatting()},t.prototype.disabledDates=function(b){if(0===arguments.length)return this._options.disabledDates?a.extend({},this._options.disabledDates):this._options.disabledDates;if(!b)return this._options.disabledDates=!1,this._update(),!0;if(!(b instanceof Array))throw new TypeError("disabledDates() expects an array parameter");this._options.disabledDates=this._indexGivenDates(b),this._options.enabledDates=!1,this._update()},t.prototype.enabledDates=function(b){if(0===arguments.length)return this._options.enabledDates?a.extend({},this._options.enabledDates):this._options.enabledDates;if(!b)return this._options.enabledDates=!1,this._update(),!0;if(!(b instanceof Array))throw new TypeError("enabledDates() expects an array parameter");this._options.enabledDates=this._indexGivenDates(b),this._options.disabledDates=!1,this._update()},t.prototype.daysOfWeekDisabled=function(a){if(0===arguments.length)return this._options.daysOfWeekDisabled.splice(0);if("boolean"==typeof a&&!a)return this._options.daysOfWeekDisabled=!1,this._update(),!0;if(!(a instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(this._options.daysOfWeekDisabled=a.reduce(function(a,b){return b=parseInt(b,10),b>6||b<0||isNaN(b)?a:(a.indexOf(b)===-1&&a.push(b),a)},[]).sort(),this._options.useCurrent&&!this._options.keepInvalid)for(var b=0;b1)throw new TypeError("multidateSeparator expects a single character string parameter");this._options.multidateSeparator=a},e(t,null,[{key:"NAME",get:function(){return d}},{key:"VERSION",get:function(){return f}},{key:"DATA_KEY",get:function(){return g}},{key:"EVENT_KEY",get:function(){return h}},{key:"DATA_API_KEY",get:function(){return i}},{key:"DatePickerModes",get:function(){return m}},{key:"ViewModes",get:function(){return o}},{key:"MinViewModeNumber",get:function(){return r}},{key:"Event",get:function(){return l}},{key:"Selector",get:function(){return j}},{key:"Default",get:function(){return s},set:function(a){s=a}},{key:"ClassName",get:function(){return k}}]),t}();return t}(jQuery,moment);(function(e){var g=e.fn[f.NAME],h=["top","bottom","auto"],i=["left","right","auto"],j=["default","top","bottom"],k=function(a){var b=a.data("target"),c=void 0;return b||(b=a.attr("href")||"",b=/^#[a-z]/i.test(b)?b:null),c=e(b),0===c.length?c:(c.data(f.DATA_KEY)||e.extend({},c.data(),e(this).data()),c)},l=function(g){function k(b,d){c(this,k);var e=a(this,g.call(this,b,d));return e._init(),e}return b(k,g),k.prototype._init=function(){if(this._element.hasClass("input-group")){var a=this._element.find(".datepickerbutton");0===a.length?this.component=this._element.find('[data-toggle="datetimepicker"]'):this.component=a}},k.prototype._getDatePickerTemplate=function(){var a=e("").append(e("").append(e("").addClass("prev").attr("data-action","previous").append(e("").addClass(this._options.icons.previous))).append(e("").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",""+(this._options.calendarWeeks?"6":"5"))).append(e("").addClass("next").attr("data-action","next").append(e("").addClass(this._options.icons.next)))),b=e("").append(e("").append(e("").attr("colspan",""+(this._options.calendarWeeks?"8":"7"))));return[e("
").addClass("datepicker-days").append(e("").addClass("table table-sm").append(a).append(e(""))),e("
").addClass("datepicker-months").append(e("
").addClass("table-condensed").append(a.clone()).append(b.clone())),e("
").addClass("datepicker-years").append(e("
").addClass("table-condensed").append(a.clone()).append(b.clone())),e("
").addClass("datepicker-decades").append(e("
").addClass("table-condensed").append(a.clone()).append(b.clone()))]},k.prototype._getTimePickerMainTemplate=function(){var a=e(""),b=e(""),c=e("");return this._isEnabled("h")&&(a.append(e("").append(e("").append(e("").append(e("").append(e("
").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.incrementHour}).addClass("btn").attr("data-action","incrementHours").append(e("").addClass(this._options.icons.up)))),b.append(e("").append(e("").addClass("timepicker-hour").attr({"data-time-component":"hours",title:this._options.tooltips.pickHour}).attr("data-action","showHours"))),c.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.decrementHour}).addClass("btn").attr("data-action","decrementHours").append(e("").addClass(this._options.icons.down))))),this._isEnabled("m")&&(this._isEnabled("h")&&(a.append(e("").addClass("separator")),b.append(e("").addClass("separator").html(":")),c.append(e("").addClass("separator"))),a.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.incrementMinute}).addClass("btn").attr("data-action","incrementMinutes").append(e("").addClass(this._options.icons.up)))),b.append(e("").append(e("").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:this._options.tooltips.pickMinute}).attr("data-action","showMinutes"))),c.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.decrementMinute}).addClass("btn").attr("data-action","decrementMinutes").append(e("").addClass(this._options.icons.down))))), +if("undefined"==typeof jQuery)throw new Error("Tempus Dominus Bootstrap4's requires jQuery. jQuery must be included before Tempus Dominus Bootstrap4's JavaScript.");if(+function(a){var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1===b[0]&&9===b[1]&&b[2]<1||b[0]>=4)throw new Error("Tempus Dominus Bootstrap4's requires at least jQuery v3.0.0 but less than v4.0.0")}(jQuery),"undefined"==typeof moment)throw new Error("Tempus Dominus Bootstrap4's requires moment.js. Moment.js must be included before Tempus Dominus Bootstrap4's JavaScript.");var version=moment.version.split(".");if(version[0]<=2&&version[1]<17||version[0]>=3)throw new Error("Tempus Dominus Bootstrap4's requires at least moment.js v2.17.0 but less than v3.0.0");+function(){function a(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function b(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){for(var c=0;c1){for(var e=0;e1)throw new TypeError("isEnabled expects a single character string parameter");switch(a){case"y":return this.actualFormat.indexOf("Y")!==-1;case"M":return this.actualFormat.indexOf("M")!==-1;case"d":return this.actualFormat.toLowerCase().indexOf("d")!==-1;case"h":case"H":return this.actualFormat.toLowerCase().indexOf("h")!==-1;case"m":return this.actualFormat.indexOf("m")!==-1;case"s":return this.actualFormat.indexOf("s")!==-1;default:return!1}},h.prototype._hasTime=function(){return this._isEnabled("h")||this._isEnabled("m")||this._isEnabled("s")},h.prototype._hasDate=function(){return this._isEnabled("y")||this._isEnabled("M")||this._isEnabled("d")},h.prototype._dataToOptions=function(){var b=this._element.data(),c={};return b.dateOptions&&b.dateOptions instanceof Object&&(c=a.extend(!0,c,b.dateOptions)),a.each(this._options,function(a){var d="date"+a.charAt(0).toUpperCase()+a.slice(1);void 0!==b[d]?c[a]=b[d]:delete c[a]}),c},h.prototype._notifyEvent=function(a){a.type===h.Event.CHANGE&&a.date&&a.date.isSame(a.oldDate)||!a.date&&!a.oldDate||this._element.trigger(a)},h.prototype._viewUpdate=function(a){"y"===a&&(a="YYYY"),this._notifyEvent({type:h.Event.UPDATE,change:a,viewDate:this._viewDate.clone()})},h.prototype._showMode=function(a){this.widget&&(a&&(this.currentViewMode=Math.max(s,Math.min(3,this.currentViewMode+a))),this.widget.find(".datepicker > div").hide().filter(".datepicker-"+n[this.currentViewMode].CLASS_NAME).show())},h.prototype._isInDisabledDates=function(a){return this._options.disabledDates[a.format("YYYY-MM-DD")]===!0},h.prototype._isInEnabledDates=function(a){return this._options.enabledDates[a.format("YYYY-MM-DD")]===!0},h.prototype._isInDisabledHours=function(a){return this._options.disabledHours[a.format("H")]===!0},h.prototype._isInEnabledHours=function(a){return this._options.enabledHours[a.format("H")]===!0},h.prototype._isValid=function(b,c){if(!b.isValid())return!1;if(this._options.disabledDates&&"d"===c&&this._isInDisabledDates(b))return!1;if(this._options.enabledDates&&"d"===c&&!this._isInEnabledDates(b))return!1;if(this._options.minDate&&b.isBefore(this._options.minDate,c))return!1;if(this._options.maxDate&&b.isAfter(this._options.maxDate,c))return!1;if(this._options.daysOfWeekDisabled&&"d"===c&&this._options.daysOfWeekDisabled.indexOf(b.day())!==-1)return!1;if(this._options.disabledHours&&("h"===c||"m"===c||"s"===c)&&this._isInDisabledHours(b))return!1;if(this._options.enabledHours&&("h"===c||"m"===c||"s"===c)&&!this._isInEnabledHours(b))return!1;if(this._options.disabledTimeIntervals&&("h"===c||"m"===c||"s"===c)){var d=!1;if(a.each(this._options.disabledTimeIntervals,function(){if(b.isBetween(this[0],this[1]))return d=!0,!1}),d)return!1}return!0},h.prototype._parseInputDate=function(a){return void 0===this._options.parseInputDate?window.moment.isMoment(a)||(a=this.getMoment(a)):a=this._options.parseInputDate(a),a},h.prototype._keydown=function(a){var b=null,c=void 0,d=void 0,e=void 0,f=void 0,g=[],h={},i=a.which,j="p";q[i]=j;for(c in q)q.hasOwnProperty(c)&&q[c]===j&&(g.push(c),parseInt(c,10)!==i&&(h[c]=!0));for(c in this._options.keyBinds)if(this._options.keyBinds.hasOwnProperty(c)&&"function"==typeof this._options.keyBinds[c]&&(e=c.split(" "),e.length===g.length&&o[i]===e[e.length-1])){for(f=!0,d=e.length-2;d>=0;d--)if(!(o[e[d]]in h)){f=!1;break}if(f){b=this._options.keyBinds[c];break}}b&&b.call(this.widget)&&(a.stopPropagation(),a.preventDefault())},h.prototype._keyup=function(a){q[a.which]="r",r[a.which]&&(r[a.which]=!1,a.stopPropagation(),a.preventDefault())},h.prototype._indexGivenDates=function(b){var c={},d=this;return a.each(b,function(){var a=d._parseInputDate(this);a.isValid()&&(c[a.format("YYYY-MM-DD")]=!0)}),!!Object.keys(c).length&&c},h.prototype._indexGivenHours=function(b){var c={};return a.each(b,function(){c[this]=!0}),!!Object.keys(c).length&&c},h.prototype._initFormatting=function(){var a=this._options.format||"L LT",b=this;this.actualFormat=a.replace(/(\[[^\[]*])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(a){return b._dates[0].localeData().longDateFormat(a)||a}),this.parseFormats=this._options.extraFormats?this._options.extraFormats.slice():[],this.parseFormats.indexOf(a)<0&&this.parseFormats.indexOf(this.actualFormat)<0&&this.parseFormats.push(this.actualFormat),this.use24Hours=this.actualFormat.toLowerCase().indexOf("a")<1&&this.actualFormat.replace(/\[.*?]/g,"").indexOf("h")<1,this._isEnabled("y")&&(s=2),this._isEnabled("M")&&(s=1),this._isEnabled("d")&&(s=0),this.currentViewMode=Math.max(s,this.currentViewMode),this.unset||this._setValue(this._dates[0],0)},h.prototype._getLastPickedDate=function(){return this._dates[this._getLastPickedDateIndex()]},h.prototype._getLastPickedDateIndex=function(){return this._dates.length-1},h.prototype.getMoment=function(a){var b=void 0;return b=void 0===a||null===a?window.moment():this._hasTimeZone()?window.moment.tz(a,this.parseFormats,this._options.useStrict,this._options.timeZone):window.moment(a,this.parseFormats,this._options.useStrict),this._hasTimeZone()&&b.tz(this._options.timeZone),b},h.prototype.toggle=function(){return this.widget?this.hide():this.show()},h.prototype.ignoreReadonly=function(a){if(0===arguments.length)return this._options.ignoreReadonly;if("boolean"!=typeof a)throw new TypeError("ignoreReadonly () expects a boolean parameter");this._options.ignoreReadonly=a},h.prototype.options=function(b){if(0===arguments.length)return a.extend(!0,{},this._options);if(!(b instanceof Object))throw new TypeError("options() this.options parameter should be an object");a.extend(!0,this._options,b);var c=this;a.each(this._options,function(a,b){void 0!==c[a]&&c[a](b)})},h.prototype.date=function(a,b){if(b=b||0,0===arguments.length)return this.unset?null:this._options.allowMultidate?this._dates.join(this._options.multidateSeparator):this._dates[b].clone();if(!(null===a||"string"==typeof a||window.moment.isMoment(a)||a instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");this._setValue(null===a?null:this._parseInputDate(a),b)},h.prototype.format=function(a){if(0===arguments.length)return this._options.format;if("string"!=typeof a&&("boolean"!=typeof a||a!==!1))throw new TypeError("format() expects a string or boolean:false parameter "+a);this._options.format=a,this.actualFormat&&this._initFormatting()},h.prototype.timeZone=function(a){if(0===arguments.length)return this._options.timeZone;if("string"!=typeof a)throw new TypeError("newZone() expects a string parameter");this._options.timeZone=a},h.prototype.dayViewHeaderFormat=function(a){if(0===arguments.length)return this._options.dayViewHeaderFormat;if("string"!=typeof a)throw new TypeError("dayViewHeaderFormat() expects a string parameter");this._options.dayViewHeaderFormat=a},h.prototype.extraFormats=function(a){if(0===arguments.length)return this._options.extraFormats;if(a!==!1&&!(a instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");this._options.extraFormats=a,this.parseFormats&&this._initFormatting()},h.prototype.disabledDates=function(b){if(0===arguments.length)return this._options.disabledDates?a.extend({},this._options.disabledDates):this._options.disabledDates;if(!b)return this._options.disabledDates=!1,this._update(),!0;if(!(b instanceof Array))throw new TypeError("disabledDates() expects an array parameter");this._options.disabledDates=this._indexGivenDates(b),this._options.enabledDates=!1,this._update()},h.prototype.enabledDates=function(b){if(0===arguments.length)return this._options.enabledDates?a.extend({},this._options.enabledDates):this._options.enabledDates;if(!b)return this._options.enabledDates=!1,this._update(),!0;if(!(b instanceof Array))throw new TypeError("enabledDates() expects an array parameter");this._options.enabledDates=this._indexGivenDates(b),this._options.disabledDates=!1,this._update()},h.prototype.daysOfWeekDisabled=function(a){if(0===arguments.length)return this._options.daysOfWeekDisabled.splice(0);if("boolean"==typeof a&&!a)return this._options.daysOfWeekDisabled=!1,this._update(),!0;if(!(a instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(this._options.daysOfWeekDisabled=a.reduce(function(a,b){return b=parseInt(b,10),b>6||b<0||isNaN(b)?a:(a.indexOf(b)===-1&&a.push(b),a)},[]).sort(),this._options.useCurrent&&!this._options.keepInvalid)for(var b=0;b1)throw new TypeError("multidateSeparator expects a single character string parameter");this._options.multidateSeparator=a},e(h,null,[{key:"NAME",get:function(){return b}},{key:"VERSION",get:function(){return d}},{key:"DATA_KEY",get:function(){return f}},{key:"EVENT_KEY",get:function(){return g}},{key:"DATA_API_KEY",get:function(){return i}},{key:"DatePickerModes",get:function(){return n}},{key:"ViewModes",get:function(){return p}},{key:"MinViewModeNumber",get:function(){return s}},{key:"Event",get:function(){return l}},{key:"Selector",get:function(){return j}},{key:"Default",get:function(){return m}},{key:"ClassName",get:function(){return k}}]),h}();return t}(jQuery);(function(e){var g=e.fn[f.NAME],h=["top","bottom","auto"],i=["left","right","auto"],j=["default","top","bottom"],k=function(a){var b=a.data("target"),c=void 0;return b||(b=a.attr("href")||"",b=/^#[a-z]/i.test(b)?b:null),c=e(b),0===c.length?c:(c.data(f.DATA_KEY)||e.extend({},c.data(),e(this).data()),c)},l=function(g){function k(b,d){c(this,k);var e=a(this,g.call(this,b,d));return e._init(),e}return b(k,g),k.prototype._init=function(){if(this._element.hasClass("input-group")){var a=this._element.find(".datepickerbutton");0===a.length?this.component=this._element.find('[data-toggle="datetimepicker"]'):this.component=a}},k.prototype._getDatePickerTemplate=function(){var a=e("
").addClass("prev").attr("data-action","previous").append(e("").addClass(this._options.icons.previous))).append(e("").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",""+(this._options.calendarWeeks?"6":"5"))).append(e("").addClass("next").attr("data-action","next").append(e("").addClass(this._options.icons.next)))),b=e("
").attr("colspan",""+(this._options.calendarWeeks?"8":"7"))));return[e("
").addClass("datepicker-days").append(e("").addClass("table table-sm").append(a).append(e(""))),e("
").addClass("datepicker-months").append(e("
").addClass("table-condensed").append(a.clone()).append(b.clone())),e("
").addClass("datepicker-years").append(e("
").addClass("table-condensed").append(a.clone()).append(b.clone())),e("
").addClass("datepicker-decades").append(e("
").addClass("table-condensed").append(a.clone()).append(b.clone()))]},k.prototype._getTimePickerMainTemplate=function(){var a=e(""),b=e(""),c=e("");return this._isEnabled("h")&&(a.append(e("
").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.incrementHour}).addClass("btn").attr("data-action","incrementHours").append(e("").addClass(this._options.icons.up)))),b.append(e("").append(e("").addClass("timepicker-hour").attr({"data-time-component":"hours",title:this._options.tooltips.pickHour}).attr("data-action","showHours"))),c.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.decrementHour}).addClass("btn").attr("data-action","decrementHours").append(e("").addClass(this._options.icons.down))))),this._isEnabled("m")&&(this._isEnabled("h")&&(a.append(e("").addClass("separator")),b.append(e("").addClass("separator").html(":")),c.append(e("").addClass("separator"))),a.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.incrementMinute}).addClass("btn").attr("data-action","incrementMinutes").append(e("").addClass(this._options.icons.up)))),b.append(e("").append(e("").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:this._options.tooltips.pickMinute}).attr("data-action","showMinutes"))),c.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.decrementMinute}).addClass("btn").attr("data-action","decrementMinutes").append(e("").addClass(this._options.icons.down))))), this._isEnabled("s")&&(this._isEnabled("m")&&(a.append(e("").addClass("separator")),b.append(e("").addClass("separator").html(":")),c.append(e("").addClass("separator"))),a.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.incrementSecond}).addClass("btn").attr("data-action","incrementSeconds").append(e("").addClass(this._options.icons.up)))),b.append(e("").append(e("").addClass("timepicker-second").attr({"data-time-component":"seconds",title:this._options.tooltips.pickSecond}).attr("data-action","showSeconds"))),c.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.decrementSecond}).addClass("btn").attr("data-action","decrementSeconds").append(e("").addClass(this._options.icons.down))))),this.use24Hours||(a.append(e("").addClass("separator")),b.append(e("").append(e("").addClass("separator"))),e("
").addClass("timepicker-picker").append(e("").addClass("table-condensed").append([a,b,c]))},k.prototype._getTimePickerTemplate=function(){var a=e("
").addClass("timepicker-hours").append(e("
").addClass("table-condensed")),b=e("
").addClass("timepicker-minutes").append(e("
").addClass("table-condensed")),c=e("
").addClass("timepicker-seconds").append(e("
").addClass("table-condensed")),d=[this._getTimePickerMainTemplate()];return this._isEnabled("h")&&d.push(a),this._isEnabled("m")&&d.push(b),this._isEnabled("s")&&d.push(c),d},k.prototype._getToolbar=function(){var a=[];return this._options.buttons.showToday&&a.push(e("
").append(e("").attr({href:"#",tabindex:"-1","data-action":"today",title:this._options.tooltips.today}).append(e("").addClass(this._options.icons.today)))),!this._options.sideBySide&&this._hasDate()&&this._hasTime()&&a.push(e("").append(e("").attr({href:"#",tabindex:"-1","data-action":"togglePicker",title:this._options.tooltips.selectTime}).append(e("").addClass(this._options.icons.time)))),this._options.buttons.showClear&&a.push(e("").append(e("").attr({href:"#",tabindex:"-1","data-action":"clear",title:this._options.tooltips.clear}).append(e("").addClass(this._options.icons.clear)))),this._options.buttons.showClose&&a.push(e("").append(e("").attr({href:"#",tabindex:"-1","data-action":"close",title:this._options.tooltips.close}).append(e("").addClass(this._options.icons.close)))),0===a.length?"":e("").addClass("table-condensed").append(e("").append(e("").append(a)))},k.prototype._getTemplate=function(){var a=e("
").addClass("bootstrap-datetimepicker-widget dropdown-menu"),b=e("
").addClass("datepicker").append(this._getDatePickerTemplate()),c=e("
").addClass("timepicker").append(this._getTimePickerTemplate()),d=e("
    ").addClass("list-unstyled"),f=e("
  • ").addClass("picker-switch"+(this._options.collapse?" accordion-toggle":"")).append(this._getToolbar());return this._options.inline&&a.removeClass("dropdown-menu"),this.use24Hours&&a.addClass("usetwentyfour"),this._isEnabled("s")&&!this.use24Hours&&a.addClass("wider"),this._options.sideBySide&&this._hasDate()&&this._hasTime()?(a.addClass("timepicker-sbs"),"top"===this._options.toolbarPlacement&&a.append(f),a.append(e("
    ").addClass("row").append(b.addClass("col-md-6")).append(c.addClass("col-md-6"))),"bottom"!==this._options.toolbarPlacement&&"default"!==this._options.toolbarPlacement||a.append(f),a):("top"===this._options.toolbarPlacement&&d.append(f),this._hasDate()&&d.append(e("
  • ").addClass(this._options.collapse&&this._hasTime()?"collapse":"").addClass(this._options.collapse&&this._hasTime()&&"time"===this._options.viewMode?"":"show").append(b)),"default"===this._options.toolbarPlacement&&d.append(f),this._hasTime()&&d.append(e("
  • ").addClass(this._options.collapse&&this._hasDate()?"collapse":"").addClass(this._options.collapse&&this._hasDate()&&"time"===this._options.viewMode?"show":"").append(c)),"bottom"===this._options.toolbarPlacement&&d.append(f),a.append(d))},k.prototype._place=function(a){var b=a&&a.data&&a.data.picker||this,c=b._options.widgetPositioning.vertical,d=b._options.widgetPositioning.horizontal,f=void 0,g=(b.component&&b.component.length?b.component:b._element).position(),h=(b.component&&b.component.length?b.component:b._element).offset();if(b._options.widgetParent)f=b._options.widgetParent.append(b.widget);else if(b._element.is("input"))f=b._element.after(b.widget).parent();else{if(b._options.inline)return void(f=b._element.append(b.widget));f=b._element,b._element.children().first().after(b.widget)}if("auto"===c&&(c=h.top+1.5*b.widget.height()>=e(window).height()+e(window).scrollTop()&&b.widget.height()+b._element.outerHeight()e(window).width()?"right":"left"),"top"===c?b.widget.addClass("top").removeClass("bottom"):b.widget.addClass("bottom").removeClass("top"),"right"===d?b.widget.addClass("float-right"):b.widget.removeClass("float-right"),"relative"!==f.css("position")&&(f=f.parents().filter(function(){return"relative"===e(this).css("position")}).first()),0===f.length)throw new Error("datetimepicker component should be placed within a relative positioned container");b.widget.css({top:"top"===c?"auto":g.top+b._element.outerHeight()+"px",bottom:"top"===c?f.outerHeight()-(f===b._element?0:g.top)+"px":"auto",left:"left"===d?(f===b._element?0:g.left)+"px":"auto",right:"left"===d?"auto":f.outerWidth()-b._element.outerWidth()-(f===b._element?0:g.left)+"px"})},k.prototype._fillDow=function(){var a=e("
"),b=this._viewDate.clone().startOf("w").startOf("d");for(this._options.calendarWeeks===!0&&a.append(e(""),this._options.calendarWeeks&&f.append('"),c.push(f)),g="",d.isBefore(this._viewDate,"M")&&(g+=" old"),d.isAfter(this._viewDate,"M")&&(g+=" new"),this._options.allowMultidate){var i=this._datesFormatted.indexOf(d.format("YYYY-MM-DD"));i!==-1&&d.isSame(this._datesFormatted[i],"d")&&!this.unset&&(g+=" active")}else d.isSame(this._getLastPickedDate(),"d")&&!this.unset&&(g+=" active");this._isValid(d,"d")||(g+=" disabled"),d.isSame(this.getMoment(),"d")&&(g+=" today"),0!==d.day()&&6!==d.day()||(g+=" weekend"),f.append('"),d.add(1,"d")}a.find("tbody").empty().append(c),this._updateMonths(),this._updateYears(),this._updateDecades()}},k.prototype._fillHours=function(){var a=this.widget.find(".timepicker-hours table"),b=this._viewDate.clone().startOf("d"),c=[],d=e("");for(this._viewDate.hour()>11&&!this.use24Hours&&b.hour(12);b.isSame(this._viewDate,"d")&&(this.use24Hours||this._viewDate.hour()<12&&b.hour()<12||this._viewDate.hour()>11);)b.hour()%4===0&&(d=e(""),c.push(d)),d.append('"),b.add(1,"h");a.empty().append(c)},k.prototype._fillMinutes=function(){for(var a=this.widget.find(".timepicker-minutes table"),b=this._viewDate.clone().startOf("h"),c=[],d=1===this._options.stepping?5:this._options.stepping,f=e("");this._viewDate.isSame(b,"h");)b.minute()%(4*d)===0&&(f=e(""),c.push(f)),f.append('"),b.add(d,"m");a.empty().append(c)},k.prototype._fillSeconds=function(){for(var a=this.widget.find(".timepicker-seconds table"),b=this._viewDate.clone().startOf("m"),c=[],d=e("");this._viewDate.isSame(b,"m");)b.second()%20===0&&(d=e(""),c.push(d)),d.append('"),b.add(5,"s");a.empty().append(c)},k.prototype._fillTime=function(){var a=void 0,b=void 0,c=this.widget.find(".timepicker span[data-time-component]");this.use24Hours||(a=this.widget.find(".timepicker [data-action=togglePeriod]"),b=this._getLastPickedDate().clone().add(this._getLastPickedDate().hours()>=12?-12:12,"h"),a.text(this._getLastPickedDate().format("A")),this._isValid(b,"h")?a.removeClass("disabled"):a.addClass("disabled")),c.filter("[data-time-component=hours]").text(this._getLastPickedDate().format(""+(this.use24Hours?"HH":"hh"))),c.filter("[data-time-component=minutes]").text(this._getLastPickedDate().format("mm")),c.filter("[data-time-component=seconds]").text(this._getLastPickedDate().format("ss")),this._fillHours(),this._fillMinutes(),this._fillSeconds()},k.prototype._doAction=function(a,b){var c=this._getLastPickedDate();if(e(a.currentTarget).is(".disabled"))return!1;switch(b=b||e(a.currentTarget).data("action")){case"next":var d=f.DatePickerModes[this.currentViewMode].NAV_FUNCTION;this._viewDate.add(f.DatePickerModes[this.currentViewMode].NAV_STEP,d),this._fillDate(),this._viewUpdate(d);break;case"previous":var g=f.DatePickerModes[this.currentViewMode].NAV_FUNCTION;this._viewDate.subtract(f.DatePickerModes[this.currentViewMode].NAV_STEP,g),this._fillDate(),this._viewUpdate(g);break;case"pickerSwitch":this._showMode(1);break;case"selectMonth":var h=e(a.target).closest("tbody").find("span").index(e(a.target));this._viewDate.month(h),this.currentViewMode===f.MinViewModeNumber?(this._setValue(c.clone().year(this._viewDate.year()).month(this._viewDate.month()),this._getLastPickedDateIndex()),this._options.inline||this.hide()):(this._showMode(-1),this._fillDate()),this._viewUpdate("M");break;case"selectYear":var i=parseInt(e(a.target).text(),10)||0;this._viewDate.year(i),this.currentViewMode===f.MinViewModeNumber?(this._setValue(c.clone().year(this._viewDate.year()),this._getLastPickedDateIndex()),this._options.inline||this.hide()):(this._showMode(-1),this._fillDate()),this._viewUpdate("YYYY");break;case"selectDecade":var j=parseInt(e(a.target).data("selection"),10)||0;this._viewDate.year(j),this.currentViewMode===f.MinViewModeNumber?(this._setValue(c.clone().year(this._viewDate.year()),this._getLastPickedDateIndex()),this._options.inline||this.hide()):(this._showMode(-1),this._fillDate()),this._viewUpdate("YYYY");break;case"selectDay":var k=this._viewDate.clone();e(a.target).is(".old")&&k.subtract(1,"M"),e(a.target).is(".new")&&k.add(1,"M"),this._setValue(k.date(parseInt(e(a.target).text(),10)),this._getLastPickedDateIndex()),this._hasTime()||this._options.keepOpen||this._options.inline||this.hide();break;case"incrementHours":var l=c.clone().add(1,"h");this._isValid(l,"h")&&this._setValue(l,this._getLastPickedDateIndex());break;case"incrementMinutes":var m=c.clone().add(this._options.stepping,"m");this._isValid(m,"m")&&this._setValue(m,this._getLastPickedDateIndex());break;case"incrementSeconds":var n=c.clone().add(1,"s");this._isValid(n,"s")&&this._setValue(n,this._getLastPickedDateIndex());break;case"decrementHours":var o=c.clone().subtract(1,"h");this._isValid(o,"h")&&this._setValue(o,this._getLastPickedDateIndex());break;case"decrementMinutes":var p=c.clone().subtract(this._options.stepping,"m");this._isValid(p,"m")&&this._setValue(p,this._getLastPickedDateIndex());break;case"decrementSeconds":var q=c.clone().subtract(1,"s");this._isValid(q,"s")&&this._setValue(q,this._getLastPickedDateIndex());break;case"togglePeriod":this._setValue(c.clone().add(c.hours()>=12?-12:12,"h"),this._getLastPickedDateIndex());break;case"togglePicker":var r=e(a.target),s=r.closest("a"),t=r.closest("ul"),u=t.find(".show"),v=t.find(".collapse:not(.show)"),w=r.is("span")?r:r.find("span"),x=void 0;if(u&&u.length){if(x=u.data("collapse"),x&&x.transitioning)return!0;u.collapse?(u.collapse("hide"),v.collapse("show")):(u.removeClass("show"),v.addClass("show")),w.toggleClass(this._options.icons.time+" "+this._options.icons.date),w.hasClass(this._options.icons.date)?s.attr("title",this._options.tooltips.selectDate):s.attr("title",this._options.tooltips.selectTime)}break;case"showPicker":this.widget.find(".timepicker > div:not(.timepicker-picker)").hide(),this.widget.find(".timepicker .timepicker-picker").show();break;case"showHours":this.widget.find(".timepicker .timepicker-picker").hide(),this.widget.find(".timepicker .timepicker-hours").show();break;case"showMinutes":this.widget.find(".timepicker .timepicker-picker").hide(),this.widget.find(".timepicker .timepicker-minutes").show();break;case"showSeconds":this.widget.find(".timepicker .timepicker-picker").hide(),this.widget.find(".timepicker .timepicker-seconds").show();break;case"selectHour":var y=parseInt(e(a.target).text(),10);this.use24Hours||(c.hours()>=12?12!==y&&(y+=12):12===y&&(y=0)),this._setValue(c.clone().hours(y),this._getLastPickedDateIndex()),this._isEnabled("a")||this._isEnabled("m")||this._options.keepOpen||this._options.inline?this._doAction(a,"showPicker"):this.hide();break;case"selectMinute":this._setValue(c.clone().minutes(parseInt(e(a.target).text(),10)),this._getLastPickedDateIndex()),this._isEnabled("a")||this._isEnabled("s")||this._options.keepOpen||this._options.inline?this._doAction(a,"showPicker"):this.hide();break;case"selectSecond":this._setValue(c.clone().seconds(parseInt(e(a.target).text(),10)),this._getLastPickedDateIndex()),this._isEnabled("a")||this._options.keepOpen||this._options.inline?this._doAction(a,"showPicker"):this.hide();break;case"clear":this.clear();break;case"close":this.hide();break;case"today":var z=this.getMoment();this._isValid(z,"d")&&this._setValue(z,this._getLastPickedDateIndex())}return!1},k.prototype.hide=function(){var a=!1;this.widget&&(this.widget.find(".collapse").each(function(){var b=e(this).data("collapse");return!b||!b.transitioning||(a=!0,!1)}),a||(this.component&&this.component.hasClass("btn")&&this.component.toggleClass("active"),this.widget.hide(),e(window).off("resize",this._place()),this.widget.off("click","[data-action]"),this.widget.off("mousedown",!1),this.widget.remove(),this.widget=!1,this._notifyEvent({type:f.Event.HIDE,date:this._getLastPickedDate().clone()}),void 0!==this.input&&this.input.blur(),this._viewDate=this._getLastPickedDate().clone()))},k.prototype.show=function(){var a=void 0,b={year:function(a){return a.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(a){return a.date(1).hours(0).seconds(0).minutes(0)},day:function(a){return a.hours(0).seconds(0).minutes(0)},hour:function(a){return a.seconds(0).minutes(0)},minute:function(a){return a.seconds(0)}};if(void 0!==this.input){if(this.input.prop("disabled")||!this._options.ignoreReadonly&&this.input.prop("readonly")||this.widget)return;void 0!==this.input.val()&&0!==this.input.val().trim().length?this._setValue(this._parseInputDate(this.input.val().trim()),0):this.unset&&this._options.useCurrent&&(a=this.getMoment(),"string"==typeof this._options.useCurrent&&(a=b[this._options.useCurrent](a)),this._setValue(a,0))}else this.unset&&this._options.useCurrent&&(a=this.getMoment(),"string"==typeof this._options.useCurrent&&(a=b[this._options.useCurrent](a)),this._setValue(a,0));this.widget=this._getTemplate(),this._fillDow(),this._fillMonths(),this.widget.find(".timepicker-hours").hide(),this.widget.find(".timepicker-minutes").hide(),this.widget.find(".timepicker-seconds").hide(),this._update(),this._showMode(),e(window).on("resize",{picker:this},this._place),this.widget.on("click","[data-action]",e.proxy(this._doAction,this)),this.widget.on("mousedown",!1),this.component&&this.component.hasClass("btn")&&this.component.toggleClass("active"),this._place(),this.widget.show(),void 0!==this.input&&this._options.focusOnShow&&!this.input.is(":focus")&&this.input.focus(),this._notifyEvent({type:f.Event.SHOW})},k.prototype.destroy=function(){this.hide(),this._element.removeData(f.DATA_KEY),this._element.removeData("date")},k.prototype.disable=function(){this.hide(),this.component&&this.component.hasClass("btn")&&this.component.addClass("disabled"),void 0!==this.input&&this.input.prop("disabled",!0)},k.prototype.enable=function(){this.component&&this.component.hasClass("btn")&&this.component.removeClass("disabled"),void 0!==this.input&&this.input.prop("disabled",!1)},k.prototype.toolbarPlacement=function(a){if(0===arguments.length)return this._options.toolbarPlacement;if("string"!=typeof a)throw new TypeError("toolbarPlacement() expects a string parameter");if(j.indexOf(a)===-1)throw new TypeError("toolbarPlacement() parameter must be one of ("+j.join(", ")+") value");this._options.toolbarPlacement=a,this.widget&&(this.hide(),this.show())},k.prototype.widgetPositioning=function(a){if(0===arguments.length)return e.extend({},this._options.widgetPositioning);if("[object Object]"!=={}.toString.call(a))throw new TypeError("widgetPositioning() expects an object variable");if(a.horizontal){if("string"!=typeof a.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(a.horizontal=a.horizontal.toLowerCase(),i.indexOf(a.horizontal)===-1)throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+i.join(", ")+")");this._options.widgetPositioning.horizontal=a.horizontal}if(a.vertical){if("string"!=typeof a.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(a.vertical=a.vertical.toLowerCase(),h.indexOf(a.vertical)===-1)throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+h.join(", ")+")");this._options.widgetPositioning.vertical=a.vertical}this._update()},k.prototype.widgetParent=function(a){if(0===arguments.length)return this._options.widgetParent;if("string"==typeof a&&(a=e(a)),null!==a&&"string"!=typeof a&&!(a instanceof e))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");this._options.widgetParent=a,this.widget&&(this.hide(),this.show())},k._jQueryHandleThis=function(a,b,c){var g=e(a).data(f.DATA_KEY);if("object"===("undefined"==typeof b?"undefined":d(b))&&e.extend({},f.Default,b),g||(g=new k(e(a),b),e(a).data(f.DATA_KEY,g)),"string"==typeof b){if(void 0===g[b])throw new Error('No method named "'+b+'"');return void 0===c?g[b]():g[b](c)}},k._jQueryInterface=function(a,b){return 1===this.length?k._jQueryHandleThis(this[0],a,b):this.each(function(){k._jQueryHandleThis(this,a,b)})},k}(f);return e(document).on(f.Event.CLICK_DATA_API,f.Selector.DATA_TOGGLE,function(){var a=k(e(this));0!==a.length&&l._jQueryInterface.call(a,"toggle")}).on(f.Event.CHANGE,"."+f.ClassName.INPUT,function(a){var b=k(e(this));0!==b.length&&l._jQueryInterface.call(b,"_change",a)}).on(f.Event.BLUR,"."+f.ClassName.INPUT,function(a){var b=k(e(this)),c=b.data(f.DATA_KEY);0!==b.length&&(c._options.debug||window.debug||l._jQueryInterface.call(b,"hide",a))}).on(f.Event.KEYDOWN,"."+f.ClassName.INPUT,function(a){var b=k(e(this));0!==b.length&&l._jQueryInterface.call(b,"_keydown",a)}).on(f.Event.KEYUP,"."+f.ClassName.INPUT,function(a){var b=k(e(this));0!==b.length&&l._jQueryInterface.call(b,"_keyup",a)}).on(f.Event.FOCUS,"."+f.ClassName.INPUT,function(a){var b=k(e(this)),c=b.data(f.DATA_KEY);0!==b.length&&c._options.allowInputToggle&&l._jQueryInterface.call(b,c,a)}),e.fn[f.NAME]=l._jQueryInterface,e.fn[f.NAME].Constructor=l,e.fn[f.NAME].noConflict=function(){return e.fn[f.NAME]=g,l._jQueryInterface},l})(jQuery)}(); \ No newline at end of file diff --git a/composer.json b/composer.json index b8fb623..fd94d47 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "tempusdominus/bootstrap-4", "type": "component", - "version": "5.0.0-alpha17", + "version": "5.0.0-alpha18", "description": "Date/time picker widget based on twitter bootstrap", "keywords": [ "bootstrap", @@ -11,9 +11,9 @@ "license": "MIT", "require": { "robloach/component-installer": "*", - "components/jquery": ">=1.9.1", + "components/jquery": ">=3.0.0", "moment": ">=2.10.5", - "tempusdominus-core": "5.0.0-alpha15" + "tempusdominus-core": "5.0.0-alpha17" }, "extra": { "component": { diff --git a/docs/404.html b/docs/404.html deleted file mode 100644 index 6d4edaa..0000000 --- a/docs/404.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - - - - - - - - - - Tempus Dominus - Bootstrap 4 - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-

404

-

Page not found

-
-
- - -
-
- - - - \ No newline at end of file diff --git a/docs/Changelog/index.html b/docs/Changelog/index.html index f3df4f7..b68bf83 100644 --- a/docs/Changelog/index.html +++ b/docs/Changelog/index.html @@ -36,7 +36,9 @@ - + + + diff --git a/docs/ContributorsGuide/index.html b/docs/ContributorsGuide/index.html index f05a135..8fafb50 100644 --- a/docs/ContributorsGuide/index.html +++ b/docs/ContributorsGuide/index.html @@ -36,7 +36,9 @@ - + + + diff --git a/docs/Events/index.html b/docs/Events/index.html index a201c39..d0581c8 100644 --- a/docs/Events/index.html +++ b/docs/Events/index.html @@ -36,7 +36,9 @@ - + + + diff --git a/docs/Extras/index.html b/docs/Extras/index.html index efc30e5..aef1cbb 100644 --- a/docs/Extras/index.html +++ b/docs/Extras/index.html @@ -36,7 +36,9 @@ - + + + diff --git a/docs/FAQ/index.html b/docs/FAQ/index.html index b81840e..86699fe 100644 --- a/docs/FAQ/index.html +++ b/docs/FAQ/index.html @@ -36,7 +36,9 @@ - + + + diff --git a/docs/Functions/index.html b/docs/Functions/index.html index b1775f4..5a4184a 100644 --- a/docs/Functions/index.html +++ b/docs/Functions/index.html @@ -36,7 +36,9 @@ - + + + diff --git a/docs/Installing/index.html b/docs/Installing/index.html index 905e59d..75b8a85 100644 --- a/docs/Installing/index.html +++ b/docs/Installing/index.html @@ -36,7 +36,9 @@ - + + + diff --git a/docs/Options/index.html b/docs/Options/index.html index b0aed37..d0a6a92 100644 --- a/docs/Options/index.html +++ b/docs/Options/index.html @@ -36,7 +36,9 @@ - + + + diff --git a/docs/Usage/index.html b/docs/Usage/index.html index b192e3f..523134b 100644 --- a/docs/Usage/index.html +++ b/docs/Usage/index.html @@ -36,7 +36,9 @@ - + + + @@ -146,7 +148,7 @@

Usage

- Basic usage and common examples + B

diff --git a/docs/css/tempusdominus-bootstrap-4.css b/docs/css/tempusdominus-bootstrap-4.css index 65ae800..366b2ea 100644 --- a/docs/css/tempusdominus-bootstrap-4.css +++ b/docs/css/tempusdominus-bootstrap-4.css @@ -1,5 +1,5 @@ /*@preserve - * Tempus Dominus Bootstrap4 v5.0.0-alpha16 (https://tempusdominus.github.io/bootstrap-4/) + * Tempus Dominus Bootstrap4 v5.0.0-alpha18 (https://tempusdominus.github.io/bootstrap-4/) * Copyright 2016-2018 Jonathan Peterson * Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE) */ @@ -126,7 +126,7 @@ width: 145px; } .bootstrap-datetimepicker-widget table th.disabled, .bootstrap-datetimepicker-widget table th.disabled:hover { background: none; - color: #868e96; + color: #6c757d; cursor: not-allowed; } .bootstrap-datetimepicker-widget table th.prev::after { content: "Previous Month"; } @@ -144,7 +144,7 @@ font-size: .8em; height: 20px; line-height: 20px; - color: #868e96; } + color: #6c757d; } .bootstrap-datetimepicker-widget table td.day { height: 20px; line-height: 20px; @@ -153,7 +153,7 @@ background: #e9ecef; cursor: pointer; } .bootstrap-datetimepicker-widget table td.old, .bootstrap-datetimepicker-widget table td.new { - color: #868e96; } + color: #6c757d; } .bootstrap-datetimepicker-widget table td.today { position: relative; } .bootstrap-datetimepicker-widget table td.today:before { @@ -174,7 +174,7 @@ border-bottom-color: #fff; } .bootstrap-datetimepicker-widget table td.disabled, .bootstrap-datetimepicker-widget table td.disabled:hover { background: none; - color: #868e96; + color: #6c757d; cursor: not-allowed; } .bootstrap-datetimepicker-widget table td span { display: inline-block; @@ -191,10 +191,10 @@ color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .bootstrap-datetimepicker-widget table td span.old { - color: #868e96; } + color: #6c757d; } .bootstrap-datetimepicker-widget table td span.disabled, .bootstrap-datetimepicker-widget table td span.disabled:hover { background: none; - color: #868e96; + color: #6c757d; cursor: not-allowed; } .bootstrap-datetimepicker-widget.usetwentyfour td.hour { height: 27px; diff --git a/docs/index.html b/docs/index.html index 0b57d6c..216515c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -37,7 +37,9 @@ - + + + @@ -121,12 +123,12 @@ -

+
- Tempus Dominus + ![Tempus Dominus](android-chrome-256x256.png)

Tempus Dominus

@@ -139,12 +141,13 @@

Tempus Dominus

Download

- Currently v5.0.0-alpha.16 + Currently v5.0.0-alpha.18

+
@@ -164,14 +167,14 @@

CDNJS

When you only need to include Tempus Dominus's compiled CSS or JS, you can use CDNJS.

 
-<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.0-alpha16/js/tempusdominus-bootstrap-4.min.js"></script>
-<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.0-alpha16/css/tempusdominus-bootstrap-4.min.css" />
+<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.0-alpha18/js/tempusdominus-bootstrap-4.min.js"></script>
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.0-alpha18/css/tempusdominus-bootstrap-4.min.css" />
 
         

Explore the docs
-

+ @@ -41,8 +41,8 @@ npm i tempusdominus-bootstrap-4

When you only need to include Tempus Dominus's compiled CSS or JS, you can use CDNJS.

 
-<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.0-alpha16/js/tempusdominus-bootstrap-4.min.js"></script>
-<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.0-alpha16/css/tempusdominus-bootstrap-4.min.css" />
+<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.0-alpha18/js/tempusdominus-bootstrap-4.min.js"></script>
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.0-alpha18/css/tempusdominus-bootstrap-4.min.css" />
 
 		

diff --git a/src/docs/theme/css/tempusdominus-bootstrap-4.css b/src/docs/theme/css/tempusdominus-bootstrap-4.css index a4f9a60..366b2ea 100644 --- a/src/docs/theme/css/tempusdominus-bootstrap-4.css +++ b/src/docs/theme/css/tempusdominus-bootstrap-4.css @@ -1,5 +1,5 @@ /*@preserve - * Tempus Dominus Bootstrap4 v5.0.0-alpha17 (https://tempusdominus.github.io/bootstrap-4/) + * Tempus Dominus Bootstrap4 v5.0.0-alpha18 (https://tempusdominus.github.io/bootstrap-4/) * Copyright 2016-2018 Jonathan Peterson * Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE) */ diff --git a/src/docs/theme/js/tempusdominus-bootstrap-4.js b/src/docs/theme/js/tempusdominus-bootstrap-4.js index 23b7a71..756f487 100644 --- a/src/docs/theme/js/tempusdominus-bootstrap-4.js +++ b/src/docs/theme/js/tempusdominus-bootstrap-4.js @@ -1,5 +1,5 @@ /*@preserve - * Tempus Dominus Bootstrap4 v5.0.0-alpha17 (https://tempusdominus.github.io/bootstrap-4/) + * Tempus Dominus Bootstrap4 v5.0.0-alpha18 (https://tempusdominus.github.io/bootstrap-4/) * Copyright 2016-2018 Jonathan Peterson * Licensed under MIT (https://github.com/tempusdominus/bootstrap-3/blob/master/LICENSE) */ @@ -11,7 +11,7 @@ if (typeof jQuery === 'undefined') { +function ($) { var version = $.fn.jquery.split(' ')[0].split('.'); if ((version[0] < 2 && version[1] < 9) || (version[0] === 1 && version[1] === 9 && version[2] < 1) || (version[0] >= 4)) { - throw new Error('Tempus Dominus Bootstrap4\'s requires at least jQuery v1.9.1 but less than v4.0.0'); + throw new Error('Tempus Dominus Bootstrap4\'s requires at least jQuery v3.0.0 but less than v4.0.0'); } }(jQuery); @@ -38,12 +38,13 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function" function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } // ReSharper disable once InconsistentNaming -var DateTimePicker = function ($, moment) { +var DateTimePicker = function ($) { // ReSharper disable InconsistentNaming var NAME = 'datetimepicker', - VERSION = '5.0.0-alpha15', + VERSION = '5.0.0-alpha7', DATA_KEY = '' + NAME, EVENT_KEY = '.' + DATA_KEY, + EMIT_EVENT_KEY = DATA_KEY + '.', DATA_API_KEY = '.data-api', Selector = { DATA_TOGGLE: '[data-toggle="' + DATA_KEY + '"]' @@ -59,63 +60,11 @@ var DateTimePicker = function ($, moment) { FOCUS: 'focus' + EVENT_KEY, CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY, //emitted - UPDATE: 'update' + EVENT_KEY, - ERROR: 'error' + EVENT_KEY, - HIDE: 'hide' + EVENT_KEY, - SHOW: 'show' + EVENT_KEY + UPDATE: EMIT_EVENT_KEY + 'update', + ERROR: EMIT_EVENT_KEY + 'error', + HIDE: EMIT_EVENT_KEY + 'hide', + SHOW: EMIT_EVENT_KEY + 'show' }, - DatePickerModes = [{ - CLASS_NAME: 'days', - NAV_FUNCTION: 'M', - NAV_STEP: 1 - }, { - CLASS_NAME: 'months', - NAV_FUNCTION: 'y', - NAV_STEP: 1 - }, { - CLASS_NAME: 'years', - NAV_FUNCTION: 'y', - NAV_STEP: 10 - }, { - CLASS_NAME: 'decades', - NAV_FUNCTION: 'y', - NAV_STEP: 100 - }], - KeyMap = { - 'up': 38, - 38: 'up', - 'down': 40, - 40: 'down', - 'left': 37, - 37: 'left', - 'right': 39, - 39: 'right', - 'tab': 9, - 9: 'tab', - 'escape': 27, - 27: 'escape', - 'enter': 13, - 13: 'enter', - 'pageUp': 33, - 33: 'pageUp', - 'pageDown': 34, - 34: 'pageDown', - 'shift': 16, - 16: 'shift', - 'control': 17, - 17: 'control', - 'space': 32, - 32: 'space', - 't': 84, - 84: 't', - 'delete': 46, - 46: 'delete' - }, - ViewModes = ['times', 'days', 'months', 'years', 'decades'], - keyState = {}, - keyPressHandled = {}; - - var MinViewModeNumber = 0, Default = { timeZone: '', format: false, @@ -126,7 +75,7 @@ var DateTimePicker = function ($, moment) { maxDate: false, useCurrent: true, collapse: true, - locale: moment.locale(), + locale: window.moment.locale(), defaultDate: false, disabledDates: false, enabledDates: false, @@ -320,8 +269,59 @@ var DateTimePicker = function ($, moment) { viewDate: false, allowMultidate: false, multidateSeparator: ',' - }; + }, + DatePickerModes = [{ + CLASS_NAME: 'days', + NAV_FUNCTION: 'M', + NAV_STEP: 1 + }, { + CLASS_NAME: 'months', + NAV_FUNCTION: 'y', + NAV_STEP: 1 + }, { + CLASS_NAME: 'years', + NAV_FUNCTION: 'y', + NAV_STEP: 10 + }, { + CLASS_NAME: 'decades', + NAV_FUNCTION: 'y', + NAV_STEP: 100 + }], + KeyMap = { + 'up': 38, + 38: 'up', + 'down': 40, + 40: 'down', + 'left': 37, + 37: 'left', + 'right': 39, + 39: 'right', + 'tab': 9, + 9: 'tab', + 'escape': 27, + 27: 'escape', + 'enter': 13, + 13: 'enter', + 'pageUp': 33, + 33: 'pageUp', + 'pageDown': 34, + 34: 'pageDown', + 'shift': 16, + 16: 'shift', + 'control': 17, + 17: 'control', + 'space': 32, + 32: 'space', + 't': 84, + 84: 't', + 'delete': 46, + 46: 'delete' + }, + ViewModes = ['times', 'days', 'months', 'years', 'decades'], + keyState = {}, + keyPressHandled = {}; + var MinViewModeNumber = 0; // ReSharper restore InconsistentNaming // ReSharper disable once DeclarationHides @@ -380,9 +380,9 @@ var DateTimePicker = function ($, moment) { this._initFormatting(); if (this.input !== undefined && this.input.is('input') && this.input.val().trim().length !== 0) { - this._setValue(this._parseInputDate(this.input.val().trim()), 0); + this._setValue(this._parseInputDate(this.input.val().trim())); } else if (this._options.defaultDate && this.input !== undefined && this.input.attr('placeholder') === undefined) { - this._setValue(this._options.defaultDate, 0); + this._setValue(this._options.defaultDate); } if (this._options.inline) { this.show(); @@ -499,7 +499,7 @@ var DateTimePicker = function ($, moment) { }; DateTimePicker.prototype._hasTimeZone = function _hasTimeZone() { - return moment.tz !== undefined && this._options.timeZone !== undefined && this._options.timeZone !== null && this._options.timeZone !== ''; + return window.moment.tz !== undefined && this._options.timeZone !== undefined && this._options.timeZone !== null && this._options.timeZone !== ''; }; DateTimePicker.prototype._isEnabled = function _isEnabled(granularity) { @@ -520,9 +520,6 @@ var DateTimePicker = function ($, moment) { return this.actualFormat.indexOf('m') !== -1; case 's': return this.actualFormat.indexOf('s') !== -1; - case 'a': - case 'A': - return this.actualFormat.toLowerCase().indexOf('a') !== -1; default: return false; } @@ -641,7 +638,7 @@ var DateTimePicker = function ($, moment) { DateTimePicker.prototype._parseInputDate = function _parseInputDate(inputDate) { if (this._options.parseInputDate === undefined) { - if (!moment.isMoment(inputDate)) { + if (!window.moment.isMoment(inputDate)) { inputDate = this.getMoment(inputDate); } } else { @@ -785,13 +782,13 @@ var DateTimePicker = function ($, moment) { var returnMoment = void 0; if (d === undefined || d === null) { - returnMoment = moment(); //TODO should this use format? and locale? + returnMoment = window.moment(); //TODO should this use format? and locale? } else if (this._hasTimeZone()) { // There is a string to parse and a default time zone // parse with the tz function which takes a default time zone if it is not in the format string - returnMoment = moment.tz(d, this.parseFormats, this._options.useStrict, this._options.timeZone); + returnMoment = window.moment.tz(d, this.parseFormats, this._options.useStrict, this._options.timeZone); } else { - returnMoment = moment(d, this.parseFormats, this._options.useStrict); + returnMoment = window.moment(d, this.parseFormats, this._options.useStrict); } if (this._hasTimeZone()) { @@ -845,7 +842,7 @@ var DateTimePicker = function ($, moment) { } } - if (newDate !== null && typeof newDate !== 'string' && !moment.isMoment(newDate) && !(newDate instanceof Date)) { + if (newDate !== null && typeof newDate !== 'string' && !window.moment.isMoment(newDate) && !(newDate instanceof Date)) { throw new TypeError('date() parameter must be one of [null, string, moment or Date]'); } @@ -853,6 +850,9 @@ var DateTimePicker = function ($, moment) { }; DateTimePicker.prototype.format = function format(newFormat) { + ///test su + ///info about para + ///returns foo if (arguments.length === 0) { return this._options.format; } @@ -1093,7 +1093,7 @@ var DateTimePicker = function ($, moment) { return this._options.locale; } - if (!moment.localeData(_locale)) { + if (!window.moment.localeData(_locale)) { throw new TypeError('locale() locale ' + _locale + ' is not loaded from moment locales!'); } @@ -1465,7 +1465,7 @@ var DateTimePicker = function ($, moment) { return true; } - if (typeof newDate !== 'string' && !moment.isMoment(newDate) && !(newDate instanceof Date)) { + if (typeof newDate !== 'string' && !window.moment.isMoment(newDate) && !(newDate instanceof Date)) { throw new TypeError('viewDate() parameter must be one of [string, moment or Date]'); } @@ -1572,9 +1572,6 @@ var DateTimePicker = function ($, moment) { key: 'Default', get: function get() { return Default; - }, - set: function set(value) { - Default = value; } }, { key: 'ClassName', @@ -1587,7 +1584,7 @@ var DateTimePicker = function ($, moment) { }(); return DateTimePicker; -}(jQuery, moment); +}(jQuery); //noinspection JSUnusedGlobalSymbols /* global DateTimePicker */ diff --git a/tasks/bump_version.js b/tasks/bump_version.js index b971339..8eca6b8 100644 --- a/tasks/bump_version.js +++ b/tasks/bump_version.js @@ -16,6 +16,19 @@ } }); + grunt.config('string-replace.package-json-lock', { + files: { 'package-lock.json': 'package-lock.json' }, + options: { + replacements: [ + { + pattern: /"version": .*/, + replacement: '"version": "' + version + '",' + } + ] + } + }); + + grunt.config('string-replace.bower-json', { files: { 'bower.json': 'bower.json' }, options: {
").addClass("cw").text("#"));b.isBefore(this._viewDate.clone().endOf("w"));)a.append(e("").addClass("dow").text(b.format("dd"))),b.add(1,"d");this.widget.find(".datepicker-days thead").append(a)},k.prototype._fillMonths=function(){for(var a=[],b=this._viewDate.clone().startOf("y").startOf("d");b.isSame(this._viewDate,"y");)a.push(e("").attr("data-action","selectMonth").addClass("month").text(b.format("MMM"))),b.add(1,"M");this.widget.find(".datepicker-months td").empty().append(a)},k.prototype._updateMonths=function(){var a=this.widget.find(".datepicker-months"),b=a.find("th"),c=a.find("tbody").find("span"),d=this;b.eq(0).find("span").attr("title",this._options.tooltips.prevYear),b.eq(1).attr("title",this._options.tooltips.selectYear),b.eq(2).find("span").attr("title",this._options.tooltips.nextYear),a.find(".disabled").removeClass("disabled"),this._isValid(this._viewDate.clone().subtract(1,"y"),"y")||b.eq(0).addClass("disabled"),b.eq(1).text(this._viewDate.year()),this._isValid(this._viewDate.clone().add(1,"y"),"y")||b.eq(2).addClass("disabled"),c.removeClass("active"),this._getLastPickedDate().isSame(this._viewDate,"y")&&!this.unset&&c.eq(this._getLastPickedDate().month()).addClass("active"),c.each(function(a){d._isValid(d._viewDate.clone().month(a),"M")||e(this).addClass("disabled")})},k.prototype._getStartEndYear=function(a,b){var c=a/10,d=Math.floor(b/a)*a,e=d+9*c,f=Math.floor(b/c)*c;return[d,e,f]},k.prototype._updateYears=function(){var a=this.widget.find(".datepicker-years"),b=a.find("th"),c=this._getStartEndYear(10,this._viewDate.year()),d=this._viewDate.clone().year(c[0]),e=this._viewDate.clone().year(c[1]),f="";for(b.eq(0).find("span").attr("title",this._options.tooltips.prevDecade),b.eq(1).attr("title",this._options.tooltips.selectDecade),b.eq(2).find("span").attr("title",this._options.tooltips.nextDecade),a.find(".disabled").removeClass("disabled"),this._options.minDate&&this._options.minDate.isAfter(d,"y")&&b.eq(0).addClass("disabled"),b.eq(1).text(d.year()+"-"+e.year()),this._options.maxDate&&this._options.maxDate.isBefore(e,"y")&&b.eq(2).addClass("disabled"),f+=''+(d.year()-1)+"";!d.isAfter(e,"y");)f+=''+d.year()+"",d.add(1,"y");f+=''+d.year()+"",a.find("td").html(f)},k.prototype._updateDecades=function(){var a=this.widget.find(".datepicker-decades"),b=a.find("th"),c=this._getStartEndYear(100,this._viewDate.year()),d=this._viewDate.clone().year(c[0]),e=this._viewDate.clone().year(c[1]),f=!1,g=!1,h=void 0,i="";for(b.eq(0).find("span").attr("title",this._options.tooltips.prevCentury),b.eq(2).find("span").attr("title",this._options.tooltips.nextCentury),a.find(".disabled").removeClass("disabled"),(0===d.year()||this._options.minDate&&this._options.minDate.isAfter(d,"y"))&&b.eq(0).addClass("disabled"),b.eq(1).text(d.year()+"-"+e.year()),this._options.maxDate&&this._options.maxDate.isBefore(e,"y")&&b.eq(2).addClass("disabled"),i+=d.year()-10<0?" ":''+(d.year()-10)+"";!d.isAfter(e,"y");)h=d.year()+11,f=this._options.minDate&&this._options.minDate.isAfter(d,"y")&&this._options.minDate.year()<=h,g=this._options.maxDate&&this._options.maxDate.isAfter(d,"y")&&this._options.maxDate.year()<=h,i+=''+d.year()+"",d.add(10,"y");i+=''+d.year()+"",a.find("td").html(i)},k.prototype._fillDate=function(){var a=this.widget.find(".datepicker-days"),b=a.find("th"),c=[],d=void 0,f=void 0,g=void 0,h=void 0;if(this._hasDate()){for(b.eq(0).find("span").attr("title",this._options.tooltips.prevMonth),b.eq(1).attr("title",this._options.tooltips.selectMonth),b.eq(2).find("span").attr("title",this._options.tooltips.nextMonth),a.find(".disabled").removeClass("disabled"),b.eq(1).text(this._viewDate.format(this._options.dayViewHeaderFormat)),this._isValid(this._viewDate.clone().subtract(1,"M"),"M")||b.eq(0).addClass("disabled"),this._isValid(this._viewDate.clone().add(1,"M"),"M")||b.eq(2).addClass("disabled"),d=this._viewDate.clone().startOf("M").startOf("w").startOf("d"),h=0;h<42;h++){if(0===d.weekday()&&(f=e("
'+d.week()+"'+d.date()+"
'+b.format(this.use24Hours?"HH":"hh")+"
'+b.format("mm")+"
'+b.format("ss")+"