expand_less
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define(a):e.moment=a()}(this,function(){"use strict";var e,n;function l(){return e.apply(null,arguments)}function _(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e){return void 0===e}function m(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function M(e,a){var t,s=[];for(t=0;t>>0,s=0;sTe(e)?(d=e+1,r=_-Te(e)):(d=e,r=_),{year:d,dayOfYear:r}}function Ie(e,a,t){var s,n,d=Ne(e.year(),a,t),r=Math.floor((e.dayOfYear()-d-1)/7)+1;return rCe(e.year(),a,t)?(s=r-Ce(e.year(),a,t),n=e.year()+1):(n=e.year(),s=r),{week:s,year:n}}function Ce(e,a,t){var s=Ne(e,a,t),n=Ne(e+1,a,t);return(Te(e)-s+n)/7}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),P("week","w"),P("isoWeek","W"),A("week",5),A("isoWeek",5),ie("w",B),ie("ww",B,V),ie("W",B),ie("WW",B,V),Me(["w","ww","W","WW"],function(e,a,t,s){a[s.substr(0,1)]=g(e)});I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),P("day","d"),P("weekday","e"),P("isoWeekday","E"),A("day",11),A("weekday",11),A("isoWeekday",11),ie("d",B),ie("e",B),ie("E",B),ie("dd",function(e,a){return a.weekdaysMinRegex(e)}),ie("ddd",function(e,a){return a.weekdaysShortRegex(e)}),ie("dddd",function(e,a){return a.weekdaysRegex(e)}),Me(["dd","ddd","dddd"],function(e,a,t,s){var n=t._locale.weekdaysParse(e,s,t._strict);null!=n?a.d=n:Y(t).invalidWeekday=e}),Me(["d","e","E"],function(e,a,t,s){a[s]=g(e)});var Ge="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ue="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Ve="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Ke=re;var $e=re;var Ze=re;function Be(){function e(e,a){return a.length-e.length}var a,t,s,n,d,r=[],_=[],i=[],o=[];for(a=0;a=a&&r(n,t,!0)>=a-1)break;a--}d++}return ea}(e)}function ma(e){var a,t=e._a;return t&&-2===Y(e).overflow&&(a=t[Le]je(t[he],t[Le])?ce:t[Ye]Ce(t,d,r)?Y(e)._overflowWeeks=!0:null!=i?Y(e)._overflowWeekday=!0:(_=Re(t,s,n,d,r),e._a[he]=_.year,e._dayOfYear=_.dayOfYear)}(e),null!=e._dayOfYear&&(d=ua(e._a[he],s[he]),(e._dayOfYear>Te(d)||0===e._dayOfYear)&&(Y(e)._overflowDayOfYear=!0),t=Je(d,0,e._dayOfYear),e._a[Le]=t.getUTCMonth(),e._a[ce]=t.getUTCDate()),a=0;at.valueOf():t.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},it.isLocal=function(){return!!this.isValid()&&!this._isUTC},it.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},it.isUtc=Na,it.isUTC=Na,it.zoneAbbr=function(){return this._isUTC?"UTC":""},it.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},it.dates=t("dates accessor is deprecated. Use date instead.",tt),it.months=t("months accessor is deprecated. Use month instead",Ee),it.years=t("years accessor is deprecated. Use year instead",ve),it.zone=t("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,a){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,a),this):-this.utcOffset()}),it.isDSTShifted=t("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e={};if(k(e,this),(e=wa(e))._a){var a=e._isUTC?c(e._a):Sa(e._a);this._isDSTShifted=this.isValid()&&0= 4)) {
throw new Error('Tempus Dominus Bootstrap4\'s requires at least jQuery v3.0.0 but less than v4.0.0');
}
}(jQuery);


if (typeof moment === 'undefined') {
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] = 3)) {
throw new Error('Tempus Dominus Bootstrap4\'s requires at least moment.js v2.17.0 but less than v3.0.0');
}

+function () {

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i 1) {
for (var i = 0; i 1) {
throw new TypeError('isEnabled expects a single character string parameter');
}
switch (granularity) {
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 false;
}
};

DateTimePicker.prototype._hasTime = function _hasTime() {
return this._isEnabled('h') || this._isEnabled('m') || this._isEnabled('s');
};

DateTimePicker.prototype._hasDate = function _hasDate() {
return this._isEnabled('y') || this._isEnabled('M') || this._isEnabled('d');
};

DateTimePicker.prototype._dataToOptions = function _dataToOptions() {
var eData = this._element.data();
var dataOptions = {};

if (eData.dateOptions && eData.dateOptions instanceof Object) {
dataOptions = $.extend(true, dataOptions, eData.dateOptions);
}

$.each(this._options, function (key) {
var attributeName = 'date' + key.charAt(0).toUpperCase() + key.slice(1); //todo data api key
if (eData[attributeName] !== undefined) {
dataOptions[key] = eData[attributeName];
} else {
delete dataOptions[key];
}
});
return dataOptions;
};

DateTimePicker.prototype._notifyEvent = function _notifyEvent(e) {
if (e.type === DateTimePicker.Event.CHANGE && (e.date && e.date.isSame(e.oldDate)) || !e.date && !e.oldDate) {
return;
}
this._element.trigger(e);
};

DateTimePicker.prototype._viewUpdate = function _viewUpdate(e) {
if (e === 'y') {
e = 'YYYY';
}
this._notifyEvent({
type: DateTimePicker.Event.UPDATE,
change: e,
viewDate: this._viewDate.clone()
});
};

DateTimePicker.prototype._showMode = function _showMode(dir) {
if (!this.widget) {
return;
}
if (dir) {
this.currentViewMode = Math.max(this.MinViewModeNumber, Math.min(3, this.currentViewMode + dir));
}
this.widget.find('.datepicker > div').hide().filter('.datepicker-' + DatePickerModes[this.currentViewMode].CLASS_NAME).show();
};

DateTimePicker.prototype._isInDisabledDates = function _isInDisabledDates(testDate) {
return this._options.disabledDates[testDate.format('YYYY-MM-DD')] === true;
};

DateTimePicker.prototype._isInEnabledDates = function _isInEnabledDates(testDate) {
return this._options.enabledDates[testDate.format('YYYY-MM-DD')] === true;
};

DateTimePicker.prototype._isInDisabledHours = function _isInDisabledHours(testDate) {
return this._options.disabledHours[testDate.format('H')] === true;
};

DateTimePicker.prototype._isInEnabledHours = function _isInEnabledHours(testDate) {
return this._options.enabledHours[testDate.format('H')] === true;
};

DateTimePicker.prototype._isValid = function _isValid(targetMoment, granularity) {
if (!targetMoment.isValid()) {
return false;
}
if (this._options.disabledDates && granularity === 'd' && this._isInDisabledDates(targetMoment)) {
return false;
}
if (this._options.enabledDates && granularity === 'd' && !this._isInEnabledDates(targetMoment)) {
return false;
}
if (this._options.minDate && targetMoment.isBefore(this._options.minDate, granularity)) {
return false;
}
if (this._options.maxDate && targetMoment.isAfter(this._options.maxDate, granularity)) {
return false;
}
if (this._options.daysOfWeekDisabled && granularity === 'd' && this._options.daysOfWeekDisabled.indexOf(targetMoment.day()) !== -1) {
return false;
}
if (this._options.disabledHours && (granularity === 'h' || granularity === 'm' || granularity === 's') && this._isInDisabledHours(targetMoment)) {
return false;
}
if (this._options.enabledHours && (granularity === 'h' || granularity === 'm' || granularity === 's') && !this._isInEnabledHours(targetMoment)) {
return false;
}
if (this._options.disabledTimeIntervals && (granularity === 'h' || granularity === 'm' || granularity === 's')) {
var found = false;
$.each(this._options.disabledTimeIntervals, function () {
if (targetMoment.isBetween(this[0], this[1])) {
found = true;
return false;
}
});
if (found) {
return false;
}
}
return true;
};

DateTimePicker.prototype._parseInputDate = function _parseInputDate(inputDate) {
if (this._options.parseInputDate === undefined) {
if (!moment.isMoment(inputDate)) {
inputDate = this.getMoment(inputDate);
}
} else {
inputDate = this._options.parseInputDate(inputDate);
}
//inputDate.locale(this.options.locale);
return inputDate;
};

DateTimePicker.prototype._keydown = function _keydown(e) {
var handler = null,
index = void 0,
index2 = void 0,
keyBindKeys = void 0,
allModifiersPressed = void 0;
var pressedKeys = [],
pressedModifiers = {},
currentKey = e.which,
pressed = 'p';

keyState[currentKey] = pressed;

for (index in keyState) {
if (keyState.hasOwnProperty(index) && keyState[index] === pressed) {
pressedKeys.push(index);
if (parseInt(index, 10) !== currentKey) {
pressedModifiers[index] = true;
}
}
}

for (index in this._options.keyBinds) {
if (this._options.keyBinds.hasOwnProperty(index) && typeof this._options.keyBinds[index] === 'function') {
keyBindKeys = index.split(' ');
if (keyBindKeys.length === pressedKeys.length && KeyMap[currentKey] === keyBindKeys[keyBindKeys.length - 1]) {
allModifiersPressed = true;
for (index2 = keyBindKeys.length - 2; index2 >= 0; index2--) {
if (!(KeyMap[keyBindKeys[index2]] in pressedModifiers)) {
allModifiersPressed = false;
break;
}
}
if (allModifiersPressed) {
handler = this._options.keyBinds[index];
break;
}
}
}
}

if (handler) {
if (handler.call(this)) {
e.stopPropagation();
e.preventDefault();
}
}
};

//noinspection JSMethodCanBeStatic,SpellCheckingInspection


DateTimePicker.prototype._keyup = function _keyup(e) {
keyState[e.which] = 'r';
if (keyPressHandled[e.which]) {
keyPressHandled[e.which] = false;
e.stopPropagation();
e.preventDefault();
}
};

DateTimePicker.prototype._indexGivenDates = function _indexGivenDates(givenDatesArray) {
// Store given enabledDates and disabledDates as keys.
// This way we can check their existence in O(1) time instead of looping through whole array.
// (for example: options.enabledDates['2014-02-27'] === true)
var givenDatesIndexed = {},
self = this;
$.each(givenDatesArray, function () {
var dDate = self._parseInputDate(this);
if (dDate.isValid()) {
givenDatesIndexed[dDate.format('YYYY-MM-DD')] = true;
}
});
return Object.keys(givenDatesIndexed).length ? givenDatesIndexed : false;
};

DateTimePicker.prototype._indexGivenHours = function _indexGivenHours(givenHoursArray) {
// Store given enabledHours and disabledHours as keys.
// This way we can check their existence in O(1) time instead of looping through whole array.
// (for example: options.enabledHours['2014-02-27'] === true)
var givenHoursIndexed = {};
$.each(givenHoursArray, function () {
givenHoursIndexed[this] = true;
});
return Object.keys(givenHoursIndexed).length ? givenHoursIndexed : false;
};

DateTimePicker.prototype._initFormatting = function _initFormatting() {
var format = this._options.format || 'L LT',
self = this;

this.actualFormat = format.replace(/(\[[^\[]*])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function (formatInput) {
return self._dates[0].localeData().longDateFormat(formatInput) || formatInput; //todo taking the first date should be ok
});

this.parseFormats = this._options.extraFormats ? this._options.extraFormats.slice() : [];
if (this.parseFormats.indexOf(format) 6 || currentValue 1) {
throw new TypeError('multidateSeparator expects a single character string parameter');
}

this._options.multidateSeparator = _multidateSeparator;
};

_createClass(DateTimePicker, null, [{
key: 'NAME',
get: function get() {
return NAME;
}

/**
* @return {string}
*/

}, {
key: 'DATA_KEY',
get: function get() {
return DATA_KEY;
}

/**
* @return {string}
*/

}, {
key: 'EVENT_KEY',
get: function get() {
return EVENT_KEY;
}

/**
* @return {string}
*/

}, {
key: 'DATA_API_KEY',
get: function get() {
return DATA_API_KEY;
}
}, {
key: 'DatePickerModes',
get: function get() {
return DatePickerModes;
}
}, {
key: 'ViewModes',
get: function get() {
return ViewModes;
}
}, {
key: 'Event',
get: function get() {
return Event;
}
}, {
key: 'Selector',
get: function get() {
return Selector;
}
}, {
key: 'Default',
get: function get() {
return Default;
},
set: function set(value) {
Default = value;
}
}, {
key: 'ClassName',
get: function get() {
return ClassName;
}
}]);

return DateTimePicker;
}();

return DateTimePicker;
}(jQuery, moment);

//noinspection JSUnusedGlobalSymbols
/* global DateTimePicker */
var TempusDominusBootstrap4 = function ($) {
// eslint-disable-line no-unused-vars
// ReSharper disable once InconsistentNaming
var JQUERY_NO_CONFLICT = $.fn[DateTimePicker.NAME],
verticalModes = ['top', 'bottom', 'auto'],
horizontalModes = ['left', 'right', 'auto'],
toolbarPlacements = ['default', 'top', 'bottom'],
getSelectorFromElement = function getSelectorFromElement($element) {
var selector = $element.data('target'),
$selector = void 0;

if (!selector) {
selector = $element.attr('href') || '';
selector = /^#[a-z]/i.test(selector) ? selector : null;
}
$selector = $(selector);
if ($selector.length === 0) {
return $selector;
}

if (!$selector.data(DateTimePicker.DATA_KEY)) {
$.extend({}, $selector.data(), $(this).data());
}

return $selector;
};

// ReSharper disable once InconsistentNaming

var TempusDominusBootstrap4 = function (_DateTimePicker) {
_inherits(TempusDominusBootstrap4, _DateTimePicker);

function TempusDominusBootstrap4(element, options) {
_classCallCheck(this, TempusDominusBootstrap4);

var _this = _possibleConstructorReturn(this, _DateTimePicker.call(this, element, options));

_this._init();
return _this;
}

TempusDominusBootstrap4.prototype._init = function _init() {
if (this._element.hasClass('input-group')) {
var datepickerButton = this._element.find('.datepickerbutton');
if (datepickerButton.length === 0) {
this.component = this._element.find('[data-toggle="datetimepicker"]');
} else {
this.component = datepickerButton;
}
}
};

TempusDominusBootstrap4.prototype._getDatePickerTemplate = function _getDatePickerTemplate() {
var headTemplate = $('').append($('').append($('').addClass('prev').attr('data-action', 'previous').append($('').addClass(this._options.icons.previous))).append($('').addClass('picker-switch').attr('data-action', 'pickerSwitch').attr('colspan', '' + (this._options.calendarWeeks ? '6' : '5'))).append($('').addClass('next').attr('data-action', 'next').append($('').addClass(this._options.icons.next)))),
contTemplate = $('').append($('').append($('').attr('colspan', '' + (this._options.calendarWeeks ? '8' : '7'))));

return [$('').addClass('datepicker-days').append($('').addClass('table table-sm').append(headTemplate).append($(''))), $('').addClass('datepicker-months').append($('').addClass('table-condensed').append(headTemplate.clone()).append(contTemplate.clone())), $('').addClass('datepicker-years').append($('').addClass('table-condensed').append(headTemplate.clone()).append(contTemplate.clone())), $('').addClass('datepicker-decades').append($('').addClass('table-condensed').append(headTemplate.clone()).append(contTemplate.clone()))];
};

TempusDominusBootstrap4.prototype._getTimePickerMainTemplate = function _getTimePickerMainTemplate() {
var topRow = $(''),
middleRow = $(''),
bottomRow = $('');

if (this._isEnabled('h')) {
topRow.append($('').append($('').attr({
href: '#',
tabindex: '-1',
'title': this._options.tooltips.incrementHour
}).addClass('btn').attr('data-action', 'incrementHours').append($('').addClass(this._options.icons.up))));
middleRow.append($('').append($('').addClass('timepicker-hour').attr({
'data-time-component': 'hours',
'title': this._options.tooltips.pickHour
}).attr('data-action', 'showHours')));
bottomRow.append($('').append($('').attr({
href: '#',
tabindex: '-1',
'title': this._options.tooltips.decrementHour
}).addClass('btn').attr('data-action', 'decrementHours').append($('').addClass(this._options.icons.down))));
}
if (this._isEnabled('m')) {
if (this._isEnabled('h')) {
topRow.append($('').addClass('separator'));
middleRow.append($('').addClass('separator').html(':'));
bottomRow.append($('').addClass('separator'));
}
topRow.append($('').append($('').attr({
href: '#',
tabindex: '-1',
'title': this._options.tooltips.incrementMinute
}).addClass('btn').attr('data-action', 'incrementMinutes').append($('').addClass(this._options.icons.up))));
middleRow.append($('').append($('').addClass('timepicker-minute').attr({
'data-time-component': 'minutes',
'title': this._options.tooltips.pickMinute
}).attr('data-action', 'showMinutes')));
bottomRow.append($('').append($('').attr({
href: '#',
tabindex: '-1',
'title': this._options.tooltips.decrementMinute
}).addClass('btn').attr('data-action', 'decrementMinutes').append($('').addClass(this._options.icons.down))));
}
if (this._isEnabled('s')) {
if (this._isEnabled('m')) {
topRow.append($('').addClass('separator'));
middleRow.append($('').addClass('separator').html(':'));
bottomRow.append($('').addClass('separator'));
}
topRow.append($('').append($('').attr({
href: '#',
tabindex: '-1',
'title': this._options.tooltips.incrementSecond
}).addClass('btn').attr('data-action', 'incrementSeconds').append($('').addClass(this._options.icons.up))));
middleRow.append($('').append($('').addClass('timepicker-second').attr({
'data-time-component': 'seconds',
'title': this._options.tooltips.pickSecond
}).attr('data-action', 'showSeconds')));
bottomRow.append($('').append($('').attr({
href: '#',
tabindex: '-1',
'title': this._options.tooltips.decrementSecond
}).addClass('btn').attr('data-action', 'decrementSeconds').append($('').addClass(this._options.icons.down))));
}

if (!this.use24Hours) {
topRow.append($('').addClass('separator'));
middleRow.append($('').append($('').addClass('btn btn-primary').attr({
'data-action': 'togglePeriod',
tabindex: '-1',
'title': this._options.tooltips.togglePeriod
})));
bottomRow.append($('').addClass('separator'));
}

return $('').addClass('timepicker-picker').append($('').addClass('table-condensed').append([topRow, middleRow, bottomRow]));
};

TempusDominusBootstrap4.prototype._getTimePickerTemplate = function _getTimePickerTemplate() {
var hoursView = $('').addClass('timepicker-hours').append($('').addClass('table-condensed')),
minutesView = $('').addClass('timepicker-minutes').append($('').addClass('table-condensed')),
secondsView = $('').addClass('timepicker-seconds').append($('').addClass('table-condensed')),
ret = [this._getTimePickerMainTemplate()];

if (this._isEnabled('h')) {
ret.push(hoursView);
}
if (this._isEnabled('m')) {
ret.push(minutesView);
}
if (this._isEnabled('s')) {
ret.push(secondsView);
}

return ret;
};

TempusDominusBootstrap4.prototype._getToolbar = function _getToolbar() {
var row = [];
if (this._options.buttons.showToday) {
row.push($('').append($('').attr({
href: '#',
tabindex: '-1',
'data-action': 'today',
'title': this._options.tooltips.today
}).append($('').addClass(this._options.icons.today))));
}
if (!this._options.sideBySide && this._hasDate() && this._hasTime()) {
var title = void 0,
icon = void 0;
if (this._options.viewMode === 'times') {
title = this._options.tooltips.selectDate;
icon = this._options.icons.date;
} else {
title = this._options.tooltips.selectTime;
icon = this._options.icons.time;
}
row.push($('').append($('').attr({
href: '#',
tabindex: '-1',
'data-action': 'togglePicker',
'title': title
}).append($('').addClass(icon))));
}
if (this._options.buttons.showClear) {
row.push($('').append($('').attr({
href: '#',
tabindex: '-1',
'data-action': 'clear',
'title': this._options.tooltips.clear
}).append($('').addClass(this._options.icons.clear))));
}
if (this._options.buttons.showClose) {
row.push($('').append($('').attr({
href: '#',
tabindex: '-1',
'data-action': 'close',
'title': this._options.tooltips.close
}).append($('').addClass(this._options.icons.close))));
}
return row.length === 0 ? '' : $('').addClass('table-condensed').append($('').append($('').append(row)));
};

TempusDominusBootstrap4.prototype._getTemplate = function _getTemplate() {
var template = $('').addClass('bootstrap-datetimepicker-widget dropdown-menu'),
dateView = $('').addClass('datepicker').append(this._getDatePickerTemplate()),
timeView = $('').addClass('timepicker').append(this._getTimePickerTemplate()),
content = $('').addClass('list-unstyled'),
toolbar = $('').addClass('picker-switch' + (this._options.collapse ? ' accordion-toggle' : '')).append(this._getToolbar());

if (this._options.inline) {
template.removeClass('dropdown-menu');
}

if (this.use24Hours) {
template.addClass('usetwentyfour');
}
if (this._isEnabled('s') && !this.use24Hours) {
template.addClass('wider');
}

if (this._options.sideBySide && this._hasDate() && this._hasTime()) {
template.addClass('timepicker-sbs');
if (this._options.toolbarPlacement === 'top') {
template.append(toolbar);
}
template.append($('').addClass('row').append(dateView.addClass('col-md-6')).append(timeView.addClass('col-md-6')));
if (this._options.toolbarPlacement === 'bottom' || this._options.toolbarPlacement === 'default') {
template.append(toolbar);
}
return template;
}

if (this._options.toolbarPlacement === 'top') {
content.append(toolbar);
}
if (this._hasDate()) {
content.append($('').addClass(this._options.collapse && this._hasTime() ? 'collapse' : '').addClass(this._options.collapse && this._hasTime() && this._options.viewMode === 'times' ? '' : 'show').append(dateView));
}
if (this._options.toolbarPlacement === 'default') {
content.append(toolbar);
}
if (this._hasTime()) {
content.append($('').addClass(this._options.collapse && this._hasDate() ? 'collapse' : '').addClass(this._options.collapse && this._hasDate() && this._options.viewMode === 'times' ? 'show' : '').append(timeView));
}
if (this._options.toolbarPlacement === 'bottom') {
content.append(toolbar);
}
return template.append(content);
};

TempusDominusBootstrap4.prototype._place = function _place(e) {
var self = e && e.data && e.data.picker || this,
vertical = self._options.widgetPositioning.vertical,
horizontal = self._options.widgetPositioning.horizontal,
parent = void 0;
var position = (self.component && self.component.length ? self.component : self._element).position(),
offset = (self.component && self.component.length ? self.component : self._element).offset();
if (self._options.widgetParent) {
parent = self._options.widgetParent.append(self.widget);
} else if (self._element.is('input')) {
parent = self._element.after(self.widget).parent();
} else if (self._options.inline) {
parent = self._element.append(self.widget);
return;
} else {
parent = self._element;
self._element.children().first().after(self.widget);
}

// Top and bottom logic
if (vertical === 'auto') {
//noinspection JSValidateTypes
if (offset.top + self.widget.height() * 1.5 >= $(window).height() + $(window).scrollTop() && self.widget.height() + self._element.outerHeight() $(window).width()) {
horizontal = 'right';
} else {
horizontal = 'left';
}
}

if (vertical === 'top') {
self.widget.addClass('top').removeClass('bottom');
} else {
self.widget.addClass('bottom').removeClass('top');
}

if (horizontal === 'right') {
self.widget.addClass('float-right');
} else {
self.widget.removeClass('float-right');
}

// find the first parent element that has a relative css positioning
if (parent.css('position') !== 'relative') {
parent = parent.parents().filter(function () {
return $(this).css('position') === 'relative';
}).first();
}

if (parent.length === 0) {
throw new Error('datetimepicker component should be placed within a relative positioned container');
}

self.widget.css({
top: vertical === 'top' ? 'auto' : position.top + self._element.outerHeight() + 'px',
bottom: vertical === 'top' ? parent.outerHeight() - (parent === self._element ? 0 : position.top) + 'px' : 'auto',
left: horizontal === 'left' ? (parent === self._element ? 0 : position.left) + 'px' : 'auto',
right: horizontal === 'left' ? 'auto' : parent.outerWidth() - self._element.outerWidth() - (parent === self._element ? 0 : position.left) + 'px'
});
};

TempusDominusBootstrap4.prototype._fillDow = function _fillDow() {
var row = $(''),
currentDate = this._viewDate.clone().startOf('w').startOf('d');

if (this._options.calendarWeeks === true) {
row.append($('').addClass('cw').text('#'));
}

while (currentDate.isBefore(this._viewDate.clone().endOf('w'))) {
row.append($('').addClass('dow').text(currentDate.format('dd')));
currentDate.add(1, 'd');
}
this.widget.find('.datepicker-days thead').append(row);
};

TempusDominusBootstrap4.prototype._fillMonths = function _fillMonths() {
var spans = [],
monthsShort = this._viewDate.clone().startOf('y').startOf('d');
while (monthsShort.isSame(this._viewDate, 'y')) {
spans.push($('').attr('data-action', 'selectMonth').addClass('month').text(monthsShort.format('MMM')));
monthsShort.add(1, 'M');
}
this.widget.find('.datepicker-months td').empty().append(spans);
};

TempusDominusBootstrap4.prototype._updateMonths = function _updateMonths() {
var monthsView = this.widget.find('.datepicker-months'),
monthsViewHeader = monthsView.find('th'),
months = monthsView.find('tbody').find('span'),
self = this;

monthsViewHeader.eq(0).find('span').attr('title', this._options.tooltips.prevYear);
monthsViewHeader.eq(1).attr('title', this._options.tooltips.selectYear);
monthsViewHeader.eq(2).find('span').attr('title', this._options.tooltips.nextYear);

monthsView.find('.disabled').removeClass('disabled');

if (!this._isValid(this._viewDate.clone().subtract(1, 'y'), 'y')) {
monthsViewHeader.eq(0).addClass('disabled');
}

monthsViewHeader.eq(1).text(this._viewDate.year());

if (!this._isValid(this._viewDate.clone().add(1, 'y'), 'y')) {
monthsViewHeader.eq(2).addClass('disabled');
}

months.removeClass('active');
if (this._getLastPickedDate().isSame(this._viewDate, 'y') && !this.unset) {
months.eq(this._getLastPickedDate().month()).addClass('active');
}

months.each(function (index) {
if (!self._isValid(self._viewDate.clone().month(index), 'M')) {
$(this).addClass('disabled');
}
});
};

TempusDominusBootstrap4.prototype._getStartEndYear = function _getStartEndYear(factor, year) {
var step = factor / 10,
startYear = Math.floor(year / factor) * factor,
endYear = startYear + step * 9,
focusValue = Math.floor(year / step) * step;
return [startYear, endYear, focusValue];
};

TempusDominusBootstrap4.prototype._updateYears = function _updateYears() {
var yearsView = this.widget.find('.datepicker-years'),
yearsViewHeader = yearsView.find('th'),
yearCaps = this._getStartEndYear(10, this._viewDate.year()),
startYear = this._viewDate.clone().year(yearCaps[0]),
endYear = this._viewDate.clone().year(yearCaps[1]);
var html = '';

yearsViewHeader.eq(0).find('span').attr('title', this._options.tooltips.prevDecade);
yearsViewHeader.eq(1).attr('title', this._options.tooltips.selectDecade);
yearsViewHeader.eq(2).find('span').attr('title', this._options.tooltips.nextDecade);

yearsView.find('.disabled').removeClass('disabled');

if (this._options.minDate && this._options.minDate.isAfter(startYear, 'y')) {
yearsViewHeader.eq(0).addClass('disabled');
}

yearsViewHeader.eq(1).text(startYear.year() + '-' + endYear.year());

if (this._options.maxDate && this._options.maxDate.isBefore(endYear, 'y')) {
yearsViewHeader.eq(2).addClass('disabled');
}

html += '' + (startYear.year() - 1) + '';
while (!startYear.isAfter(endYear, 'y')) {
html += '' + startYear.year() + '';
startYear.add(1, 'y');
}
html += '' + startYear.year() + '';

yearsView.find('td').html(html);
};

TempusDominusBootstrap4.prototype._updateDecades = function _updateDecades() {
var decadesView = this.widget.find('.datepicker-decades'),
decadesViewHeader = decadesView.find('th'),
yearCaps = this._getStartEndYear(100, this._viewDate.year()),
startDecade = this._viewDate.clone().year(yearCaps[0]),
endDecade = this._viewDate.clone().year(yearCaps[1]);
var minDateDecade = false,
maxDateDecade = false,
endDecadeYear = void 0,
html = '';

decadesViewHeader.eq(0).find('span').attr('title', this._options.tooltips.prevCentury);
decadesViewHeader.eq(2).find('span').attr('title', this._options.tooltips.nextCentury);

decadesView.find('.disabled').removeClass('disabled');

if (startDecade.year() === 0 || this._options.minDate && this._options.minDate.isAfter(startDecade, 'y')) {
decadesViewHeader.eq(0).addClass('disabled');
}

decadesViewHeader.eq(1).text(startDecade.year() + '-' + endDecade.year());

if (this._options.maxDate && this._options.maxDate.isBefore(endDecade, 'y')) {
decadesViewHeader.eq(2).addClass('disabled');
}

if (startDecade.year() - 10  ';
} else {
html += '' + (startDecade.year() - 10) + '';
}

while (!startDecade.isAfter(endDecade, 'y')) {
endDecadeYear = startDecade.year() + 11;
minDateDecade = this._options.minDate && this._options.minDate.isAfter(startDecade, 'y') && this._options.minDate.year() ' + startDecade.year() + '';
startDecade.add(10, 'y');
}
html += '' + startDecade.year() + '';

decadesView.find('td').html(html);
};

TempusDominusBootstrap4.prototype._fillDate = function _fillDate() {
var daysView = this.widget.find('.datepicker-days'),
daysViewHeader = daysView.find('th'),
html = [];
var currentDate = void 0,
row = void 0,
clsName = void 0,
i = void 0;

if (!this._hasDate()) {
return;
}

daysViewHeader.eq(0).find('span').attr('title', this._options.tooltips.prevMonth);
daysViewHeader.eq(1).attr('title', this._options.tooltips.selectMonth);
daysViewHeader.eq(2).find('span').attr('title', this._options.tooltips.nextMonth);

daysView.find('.disabled').removeClass('disabled');
daysViewHeader.eq(1).text(this._viewDate.format(this._options.dayViewHeaderFormat));

if (!this._isValid(this._viewDate.clone().subtract(1, 'M'), 'M')) {
daysViewHeader.eq(0).addClass('disabled');
}
if (!this._isValid(this._viewDate.clone().add(1, 'M'), 'M')) {
daysViewHeader.eq(2).addClass('disabled');
}

currentDate = this._viewDate.clone().startOf('M').startOf('w').startOf('d');

for (i = 0; i ');
if (this._options.calendarWeeks) {
row.append('' + currentDate.week() + '');
}
html.push(row);
}
clsName = '';
if (currentDate.isBefore(this._viewDate, 'M')) {
clsName += ' old';
}
if (currentDate.isAfter(this._viewDate, 'M')) {
clsName += ' new';
}
if (this._options.allowMultidate) {
var index = this._datesFormatted.indexOf(currentDate.format('YYYY-MM-DD'));
if (index !== -1) {
if (currentDate.isSame(this._datesFormatted[index], 'd') && !this.unset) {
clsName += ' active';
}
}
} else {
if (currentDate.isSame(this._getLastPickedDate(), 'd') && !this.unset) {
clsName += ' active';
}
}
if (!this._isValid(currentDate, 'd')) {
clsName += ' disabled';
}
if (currentDate.isSame(this.getMoment(), 'd')) {
clsName += ' today';
}
if (currentDate.day() === 0 || currentDate.day() === 6) {
clsName += ' weekend';
}
row.append('' + currentDate.date() + '');
currentDate.add(1, 'd');
}

daysView.find('tbody').empty().append(html);

this._updateMonths();

this._updateYears();

this._updateDecades();
};

TempusDominusBootstrap4.prototype._fillHours = function _fillHours() {
var table = this.widget.find('.timepicker-hours table'),
currentHour = this._viewDate.clone().startOf('d'),
html = [];
var row = $('');

if (this._viewDate.hour() > 11 && !this.use24Hours) {
currentHour.hour(12);
}
while (currentHour.isSame(this._viewDate, 'd') && (this.use24Hours || this._viewDate.hour() 11)) {
if (currentHour.hour() % 4 === 0) {
row = $('');
html.push(row);
}
row.append('' + currentHour.format(this.use24Hours ? 'HH' : 'hh') + '');
currentHour.add(1, 'h');
}
table.empty().append(html);
};

TempusDominusBootstrap4.prototype._fillMinutes = function _fillMinutes() {
var table = this.widget.find('.timepicker-minutes table'),
currentMinute = this._viewDate.clone().startOf('h'),
html = [],
step = this._options.stepping === 1 ? 5 : this._options.stepping;
var row = $('');

while (this._viewDate.isSame(currentMinute, 'h')) {
if (currentMinute.minute() % (step * 4) === 0) {
row = $('');
html.push(row);
}
row.append('' + currentMinute.format('mm') + '');
currentMinute.add(step, 'm');
}
table.empty().append(html);
};

TempusDominusBootstrap4.prototype._fillSeconds = function _fillSeconds() {
var table = this.widget.find('.timepicker-seconds table'),
currentSecond = this._viewDate.clone().startOf('m'),
html = [];
var row = $('');

while (this._viewDate.isSame(currentSecond, 'm')) {
if (currentSecond.second() % 20 === 0) {
row = $('');
html.push(row);
}
row.append('' + currentSecond.format('ss') + '');
currentSecond.add(5, 's');
}

table.empty().append(html);
};

TempusDominusBootstrap4.prototype._fillTime = function _fillTime() {
var toggle = void 0,
newDate = void 0;
var timeComponents = this.widget.find('.timepicker span[data-time-component]');

if (!this.use24Hours) {
toggle = this.widget.find('.timepicker [data-action=togglePeriod]');
newDate = this._getLastPickedDate().clone().add(this._getLastPickedDate().hours() >= 12 ? -12 : 12, 'h');

toggle.text(this._getLastPickedDate().format('A'));

if (this._isValid(newDate, 'h')) {
toggle.removeClass('disabled');
} else {
toggle.addClass('disabled');
}
}
timeComponents.filter('[data-time-component=hours]').text(this._getLastPickedDate().format('' + (this.use24Hours ? 'HH' : 'hh')));
timeComponents.filter('[data-time-component=minutes]').text(this._getLastPickedDate().format('mm'));
timeComponents.filter('[data-time-component=seconds]').text(this._getLastPickedDate().format('ss'));

this._fillHours();
this._fillMinutes();
this._fillSeconds();
};

TempusDominusBootstrap4.prototype._doAction = function _doAction(e, action) {
var lastPicked = this._getLastPickedDate();
if ($(e.currentTarget).is('.disabled')) {
return false;
}
action = action || $(e.currentTarget).data('action');
switch (action) {
case 'next':
{
var navFnc = DateTimePicker.DatePickerModes[this.currentViewMode].NAV_FUNCTION;
this._viewDate.add(DateTimePicker.DatePickerModes[this.currentViewMode].NAV_STEP, navFnc);
this._fillDate();
this._viewUpdate(navFnc);
break;
}
case 'previous':
{
var _navFnc = DateTimePicker.DatePickerModes[this.currentViewMode].NAV_FUNCTION;
this._viewDate.subtract(DateTimePicker.DatePickerModes[this.currentViewMode].NAV_STEP, _navFnc);
this._fillDate();
this._viewUpdate(_navFnc);
break;
}
case 'pickerSwitch':
this._showMode(1);
break;
case 'selectMonth':
{
var month = $(e.target).closest('tbody').find('span').index($(e.target));
this._viewDate.month(month);
if (this.currentViewMode === this.MinViewModeNumber) {
this._setValue(lastPicked.clone().year(this._viewDate.year()).month(this._viewDate.month()), this._getLastPickedDateIndex());
if (!this._options.inline) {
this.hide();
}
} else {
this._showMode(-1);
this._fillDate();
}
this._viewUpdate('M');
break;
}
case 'selectYear':
{
var year = parseInt($(e.target).text(), 10) || 0;
this._viewDate.year(year);
if (this.currentViewMode === this.MinViewModeNumber) {
this._setValue(lastPicked.clone().year(this._viewDate.year()), this._getLastPickedDateIndex());
if (!this._options.inline) {
this.hide();
}
} else {
this._showMode(-1);
this._fillDate();
}
this._viewUpdate('YYYY');
break;
}
case 'selectDecade':
{
var _year = parseInt($(e.target).data('selection'), 10) || 0;
this._viewDate.year(_year);
if (this.currentViewMode === this.MinViewModeNumber) {
this._setValue(lastPicked.clone().year(this._viewDate.year()), this._getLastPickedDateIndex());
if (!this._options.inline) {
this.hide();
}
} else {
this._showMode(-1);
this._fillDate();
}
this._viewUpdate('YYYY');
break;
}
case 'selectDay':
{
var day = this._viewDate.clone();
if ($(e.target).is('.old')) {
day.subtract(1, 'M');
}
if ($(e.target).is('.new')) {
day.add(1, 'M');
}

var selectDate = day.date(parseInt($(e.target).text(), 10)),
index = 0;
if (this._options.allowMultidate) {
index = this._datesFormatted.indexOf(selectDate.format('YYYY-MM-DD'));
if (index !== -1) {
this._setValue(null, index); //deselect multidate
} else {
this._setValue(selectDate, this._getLastPickedDateIndex() + 1);
}
} else {
this._setValue(selectDate, this._getLastPickedDateIndex());
}

if (!this._hasTime() && !this._options.keepOpen && !this._options.inline && !this._options.allowMultidate) {
this.hide();
}
break;
}
case 'incrementHours':
{
var newDate = lastPicked.clone().add(1, 'h');
if (this._isValid(newDate, 'h')) {
this._setValue(newDate, this._getLastPickedDateIndex());
}
break;
}
case 'incrementMinutes':
{
var _newDate = lastPicked.clone().add(this._options.stepping, 'm');
if (this._isValid(_newDate, 'm')) {
this._setValue(_newDate, this._getLastPickedDateIndex());
}
break;
}
case 'incrementSeconds':
{
var _newDate2 = lastPicked.clone().add(1, 's');
if (this._isValid(_newDate2, 's')) {
this._setValue(_newDate2, this._getLastPickedDateIndex());
}
break;
}
case 'decrementHours':
{
var _newDate3 = lastPicked.clone().subtract(1, 'h');
if (this._isValid(_newDate3, 'h')) {
this._setValue(_newDate3, this._getLastPickedDateIndex());
}
break;
}
case 'decrementMinutes':
{
var _newDate4 = lastPicked.clone().subtract(this._options.stepping, 'm');
if (this._isValid(_newDate4, 'm')) {
this._setValue(_newDate4, this._getLastPickedDateIndex());
}
break;
}
case 'decrementSeconds':
{
var _newDate5 = lastPicked.clone().subtract(1, 's');
if (this._isValid(_newDate5, 's')) {
this._setValue(_newDate5, this._getLastPickedDateIndex());
}
break;
}
case 'togglePeriod':
{
this._setValue(lastPicked.clone().add(lastPicked.hours() >= 12 ? -12 : 12, 'h'), this._getLastPickedDateIndex());
break;
}
case 'togglePicker':
{
var $this = $(e.target),
$link = $this.closest('a'),
$parent = $this.closest('ul'),
expanded = $parent.find('.show'),
closed = $parent.find('.collapse:not(.show)'),
$span = $this.is('span') ? $this : $this.find('span');
var collapseData = void 0;

if (expanded && expanded.length) {
collapseData = expanded.data('collapse');
if (collapseData && collapseData.transitioning) {
return true;
}
if (expanded.collapse) {
// if collapse plugin is available through bootstrap.js then use it
expanded.collapse('hide');
closed.collapse('show');
} else {
// otherwise just toggle in class on the two views
expanded.removeClass('show');
closed.addClass('show');
}
$span.toggleClass(this._options.icons.time + ' ' + this._options.icons.date);

if ($span.hasClass(this._options.icons.date)) {
$link.attr('title', this._options.tooltips.selectDate);
} else {
$link.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 hour = parseInt($(e.target).text(), 10);

if (!this.use24Hours) {
if (lastPicked.hours() >= 12) {
if (hour !== 12) {
hour += 12;
}
} else {
if (hour === 12) {
hour = 0;
}
}
}
this._setValue(lastPicked.clone().hours(hour), this._getLastPickedDateIndex());
if (!this._isEnabled('a') && !this._isEnabled('m') && !this._options.keepOpen && !this._options.inline) {
this.hide();
} else {
this._doAction(e, 'showPicker');
}
break;
}
case 'selectMinute':
this._setValue(lastPicked.clone().minutes(parseInt($(e.target).text(), 10)), this._getLastPickedDateIndex());
if (!this._isEnabled('a') && !this._isEnabled('s') && !this._options.keepOpen && !this._options.inline) {
this.hide();
} else {
this._doAction(e, 'showPicker');
}
break;
case 'selectSecond':
this._setValue(lastPicked.clone().seconds(parseInt($(e.target).text(), 10)), this._getLastPickedDateIndex());
if (!this._isEnabled('a') && !this._options.keepOpen && !this._options.inline) {
this.hide();
} else {
this._doAction(e, 'showPicker');
}
break;
case 'clear':
this.clear();
break;
case 'close':
this.hide();
break;
case 'today':
{
var todaysDate = this.getMoment();
if (this._isValid(todaysDate, 'd')) {
this._setValue(todaysDate, this._getLastPickedDateIndex());
}
break;
}
}
return false;
};

//public


TempusDominusBootstrap4.prototype.hide = function hide() {
var transitioning = false;
if (!this.widget) {
return;
}
// Ignore event if in the middle of a picker transition
this.widget.find('.collapse').each(function () {
var collapseData = $(this).data('collapse');
if (collapseData && collapseData.transitioning) {
transitioning = true;
return false;
}
return true;
});
if (transitioning) {
return;
}
if (this.component && this.component.hasClass('btn')) {
this.component.toggleClass('active');
}
this.widget.hide();

$(window).off('resize', this._place());
this.widget.off('click', '[data-action]');
this.widget.off('mousedown', false);

this.widget.remove();
this.widget = false;

this._notifyEvent({
type: DateTimePicker.Event.HIDE,
date: this._getLastPickedDate().clone()
});

if (this.input !== undefined) {
this.input.blur();
}

this._viewDate = this._getLastPickedDate().clone();
};

TempusDominusBootstrap4.prototype.show = function show() {
var currentMoment = void 0;
var useCurrentGranularity = {
'year': function year(m) {
return m.month(0).date(1).hours(0).seconds(0).minutes(0);
},
'month': function month(m) {
return m.date(1).hours(0).seconds(0).minutes(0);
},
'day': function day(m) {
return m.hours(0).seconds(0).minutes(0);
},
'hour': function hour(m) {
return m.seconds(0).minutes(0);
},
'minute': function minute(m) {
return m.seconds(0);
}
};

if (this.input !== undefined) {
if (this.input.prop('disabled') || !this._options.ignoreReadonly && this.input.prop('readonly') || this.widget) {
return;
}
if (this.input.val() !== undefined && this.input.val().trim().length !== 0) {
this._setValue(this._parseInputDate(this.input.val().trim()), 0);
} else if (this.unset && this._options.useCurrent) {
currentMoment = this.getMoment();
if (typeof this._options.useCurrent === 'string') {
currentMoment = useCurrentGranularity[this._options.useCurrent](currentMoment);
}
this._setValue(currentMoment, 0);
}
} else if (this.unset && this._options.useCurrent) {
currentMoment = this.getMoment();
if (typeof this._options.useCurrent === 'string') {
currentMoment = useCurrentGranularity[this._options.useCurrent](currentMoment);
}
this._setValue(currentMoment, 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();

$(window).on('resize', { picker: this }, this._place);
this.widget.on('click', '[data-action]', $.proxy(this._doAction, this)); // this handles clicks on the widget
this.widget.on('mousedown', false);

if (this.component && this.component.hasClass('btn')) {
this.component.toggleClass('active');
}
this._place();
this.widget.show();
if (this.input !== undefined && this._options.focusOnShow && !this.input.is(':focus')) {
this.input.focus();
}

this._notifyEvent({
type: DateTimePicker.Event.SHOW
});
};

TempusDominusBootstrap4.prototype.destroy = function destroy() {
this.hide();
//todo doc off?
this._element.removeData(DateTimePicker.DATA_KEY);
this._element.removeData('date');
};

TempusDominusBootstrap4.prototype.disable = function disable() {
this.hide();
if (this.component && this.component.hasClass('btn')) {
this.component.addClass('disabled');
}
if (this.input !== undefined) {
this.input.prop('disabled', true); //todo disable this/comp if input is null
}
};

TempusDominusBootstrap4.prototype.enable = function enable() {
if (this.component && this.component.hasClass('btn')) {
this.component.removeClass('disabled');
}
if (this.input !== undefined) {
this.input.prop('disabled', false); //todo enable comp/this if input is null
}
};

TempusDominusBootstrap4.prototype.toolbarPlacement = function toolbarPlacement(_toolbarPlacement) {
if (arguments.length === 0) {
return this._options.toolbarPlacement;
}

if (typeof _toolbarPlacement !== 'string') {
throw new TypeError('toolbarPlacement() expects a string parameter');
}
if (toolbarPlacements.indexOf(_toolbarPlacement) === -1) {
throw new TypeError('toolbarPlacement() parameter must be one of (' + toolbarPlacements.join(', ') + ') value');
}
this._options.toolbarPlacement = _toolbarPlacement;

if (this.widget) {
this.hide();
this.show();
}
};

TempusDominusBootstrap4.prototype.widgetPositioning = function widgetPositioning(_widgetPositioning) {
if (arguments.length === 0) {
return $.extend({}, this._options.widgetPositioning);
}

if ({}.toString.call(_widgetPositioning) !== '[object Object]') {
throw new TypeError('widgetPositioning() expects an object variable');
}
if (_widgetPositioning.horizontal) {
if (typeof _widgetPositioning.horizontal !== 'string') {
throw new TypeError('widgetPositioning() horizontal variable must be a string');
}
_widgetPositioning.horizontal = _widgetPositioning.horizontal.toLowerCase();
if (horizontalModes.indexOf(_widgetPositioning.horizontal) === -1) {
throw new TypeError('widgetPositioning() expects horizontal parameter to be one of (' + horizontalModes.join(', ') + ')');
}
this._options.widgetPositioning.horizontal = _widgetPositioning.horizontal;
}
if (_widgetPositioning.vertical) {
if (typeof _widgetPositioning.vertical !== 'string') {
throw new TypeError('widgetPositioning() vertical variable must be a string');
}
_widgetPositioning.vertical = _widgetPositioning.vertical.toLowerCase();
if (verticalModes.indexOf(_widgetPositioning.vertical) === -1) {
throw new TypeError('widgetPositioning() expects vertical parameter to be one of (' + verticalModes.join(', ') + ')');
}
this._options.widgetPositioning.vertical = _widgetPositioning.vertical;
}
this._update();
};

TempusDominusBootstrap4.prototype.widgetParent = function widgetParent(_widgetParent) {
if (arguments.length === 0) {
return this._options.widgetParent;
}

if (typeof _widgetParent === 'string') {
_widgetParent = $(_widgetParent);
}

if (_widgetParent !== null && typeof _widgetParent !== 'string' && !(_widgetParent instanceof $)) {
throw new TypeError('widgetParent() expects a string or a jQuery object parameter');
}

this._options.widgetParent = _widgetParent;
if (this.widget) {
this.hide();
this.show();
}
};

//static


TempusDominusBootstrap4._jQueryHandleThis = function _jQueryHandleThis(me, option, argument) {
var data = $(me).data(DateTimePicker.DATA_KEY);
if ((typeof option === 'undefined' ? 'undefined' : _typeof(option)) === 'object') {
$.extend({}, DateTimePicker.Default, option);
}

if (!data) {
data = new TempusDominusBootstrap4($(me), option);
$(me).data(DateTimePicker.DATA_KEY, data);
}

if (typeof option === 'string') {
if (data[option] === undefined) {
throw new Error('No method named "' + option + '"');
}
if (argument === undefined) {
return data[option]();
} else {
return data[option](argument);
}
}
};

TempusDominusBootstrap4._jQueryInterface = function _jQueryInterface(option, argument) {
if (this.length === 1) {
return TempusDominusBootstrap4._jQueryHandleThis(this[0], option, argument);
}
return this.each(function () {
TempusDominusBootstrap4._jQueryHandleThis(this, option, argument);
});
};

return TempusDominusBootstrap4;
}(DateTimePicker);

/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/


$(document).on(DateTimePicker.Event.CLICK_DATA_API, DateTimePicker.Selector.DATA_TOGGLE, function () {
var $target = getSelectorFromElement($(this));
if ($target.length === 0) {
return;
}
TempusDominusBootstrap4._jQueryInterface.call($target, 'toggle');
}).on(DateTimePicker.Event.CHANGE, '.' + DateTimePicker.ClassName.INPUT, function (event) {
var $target = getSelectorFromElement($(this));
if ($target.length === 0) {
return;
}
TempusDominusBootstrap4._jQueryInterface.call($target, '_change', event);
}).on(DateTimePicker.Event.BLUR, '.' + DateTimePicker.ClassName.INPUT, function (event) {
var $target = getSelectorFromElement($(this)),
config = $target.data(DateTimePicker.DATA_KEY);
if ($target.length === 0) {
return;
}
if (config._options.debug || window.debug) {
return;
}
TempusDominusBootstrap4._jQueryInterface.call($target, 'hide', event);
}).on(DateTimePicker.Event.KEYDOWN, '.' + DateTimePicker.ClassName.INPUT, function (event) {
var $target = getSelectorFromElement($(this));
if ($target.length === 0) {
return;
}
TempusDominusBootstrap4._jQueryInterface.call($target, '_keydown', event);
}).on(DateTimePicker.Event.KEYUP, '.' + DateTimePicker.ClassName.INPUT, function (event) {
var $target = getSelectorFromElement($(this));
if ($target.length === 0) {
return;
}
TempusDominusBootstrap4._jQueryInterface.call($target, '_keyup', event);
}).on(DateTimePicker.Event.FOCUS, '.' + DateTimePicker.ClassName.INPUT, function (event) {
var $target = getSelectorFromElement($(this)),
config = $target.data(DateTimePicker.DATA_KEY);
if ($target.length === 0) {
return;
}
if (!config._options.allowInputToggle) {
return;
}
TempusDominusBootstrap4._jQueryInterface.call($target, 'show', event);
});

$.fn[DateTimePicker.NAME] = TempusDominusBootstrap4._jQueryInterface;
$.fn[DateTimePicker.NAME].Constructor = TempusDominusBootstrap4;
$.fn[DateTimePicker.NAME].noConflict = function () {
$.fn[DateTimePicker.NAME] = JQUERY_NO_CONFLICT;
return TempusDominusBootstrap4._jQueryInterface;
};

return TempusDominusBootstrap4;
}(jQuery);

}();
 
 
Wheeled by Wagn v. 0.8.2