mirror of
https://github.com/techgarage-ir/MTWireGuard.git
synced 2025-08-31 07:09:50 +02:00
20 lines
No EOL
1.1 KiB
JavaScript
20 lines
No EOL
1.1 KiB
JavaScript
/*!
|
|
* Tempus Dominus v6.7.7 (https://getdatepicker.com/)
|
|
* Copyright 2013-2023 Jonathan Peterson
|
|
* Licensed under MIT (https://github.com/Eonasdan/tempus-dominus/blob/master/LICENSE)
|
|
*/
|
|
(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?module.exports=f():typeof define==='function'&&define.amd?define(f):(g=typeof globalThis!=='undefined'?globalThis:g||self,(g.tempusDominus=g.tempusDominus||{},g.tempusDominus.plugins=g.tempusDominus.plugins||{},g.tempusDominus.plugins.moment_parse=f()));})(this,(function(){'use strict';var index = (option, tdClasses, tdFactory) => {
|
|
tdClasses.Dates.prototype.setFromInput = function (value, index) {
|
|
const converted = moment(value, option);
|
|
if (converted.isValid()) {
|
|
const date = tdFactory.DateTime.convert(converted.toDate(), this.optionsStore.options.localization.locale);
|
|
this.setValue(date, index);
|
|
}
|
|
else {
|
|
console.warn('Momentjs failed to parse the input date.');
|
|
}
|
|
};
|
|
tdClasses.Dates.prototype.formatInput = function (date) {
|
|
return moment(date).format(option);
|
|
};
|
|
};return index;})); |