Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tail.datetime

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tail.datetime - npm Package Compare versions

Comparing version 0.3.2 to 0.3.3

15

CHANGELOG.md
CHANGELOG
=========
Version 0.3.3 - Alpha
---------------------
- Add: A new internal translate / string function called `__()`.
- Add: New `reload()` method, which calls `remove()` and re-inits the DateTime Calendar.
- Update: Use `this` to call the main DateTime IIFE function.
- Update: Update the selected date when the input field has been filled out manually.
- BugFix: Fix Typo and wrong attribute name in `remove()` method.
- BugFix: `Enter` / `Return` executes all events, even if just one field is in focus.
- Removed: The `dateRange` fallback option has been removed, to clean the source up for the next major version.
Version 0.3.2 - Alpha
---------------------
- Info: npmJS Version Fix.
- Add: Spanish translation
Version 0.3.1 - Alpha

@@ -5,0 +20,0 @@ ---------------------

117

js/tail.datetime.js

@@ -5,3 +5,3 @@ /*

| MrGuiseppe <https://github.com/MrGuiseppe/pureJSCalendar/>
| @version 0.3.2 [0.1.0] - Alpha
| @version 0.3.3 [0.1.0] - Alpha
|

@@ -12,4 +12,5 @@ | @license X11 / MIT License

*/
;(function(w, d){
;(function(w){
"use strict";
var d = w.document;

@@ -51,3 +52,3 @@ /*

| @since 0.1.0
| @update 0.3.0
| @update 0.3.3
*/

@@ -80,8 +81,2 @@ var tailDateTime = function(element, config){

// Convert `dateRange` into `dateRanges`
if(typeof(config.dateRange) == "Object" && config.dateRange instanceof Array){
config.dateRanges = config.dateRange;
}
delete config.dateRange;
// Vaildate DateRange

@@ -93,5 +88,5 @@ if(config.dateRanges && config.dateRanges.length > 0){

// Week-Day
if(typeof(t[0]) == "string" && str.shorts.indexOf(t[0]) >= 0){
t[0] = str.shorts.indexOf(t[0]);
t[1] = (t.length >= 2 && str.shorts.indexOf(t[1]) >= 0)? str.shorts.indexOf(t[1]): 6;
if(typeof(t[0]) == "string" && __("shorts").indexOf(t[0]) >= 0){
t[0] = __("shorts").indexOf(t[0]);
t[1] = (t.length >= 2 && __("shorts").indexOf(t[1]) >= 0)? __("shorts").indexOf(t[1]): 6;
continue;

@@ -119,3 +114,2 @@ }

// Init Prototype Instance
str = w.tail.DateTime.strings;
this.e = element;

@@ -125,3 +119,3 @@ this.con = Object.assign({}, tailDateTime.defaults, (typeof(config) == "object")? config: {});

};
tailDateTime.version = "0.3.2";
tailDateTime.version = "0.3.3";
tailDateTime.status = "alpha";

@@ -159,3 +153,11 @@ tailDateTime.count = 0;

};
var str = tailDateTime.strings;
var __ = function(string, number){
if(string in w.tail.DateTime.strings){
if(number !== undefined){
return w.tail.DateTime.strings[string][number];
}
return w.tail.DateTime.strings[string];
}
return false;
}

@@ -175,3 +177,3 @@ /*

| @since 0.1.0
| @update 0.3.1
| @update 0.3.3
*/

@@ -209,3 +211,3 @@ init: function(){

' <span data-tail-navi="check" class="calendar-button button-check"></span>' +
' <span data-tail-navi="switch" class="calendar-label">' + str.header[2] + '</span>' +
' <span data-tail-navi="switch" class="calendar-label">' + __("header", 2) + '</span>' +
' <span data-tail-navi="close" class="calendar-button button-close"></span>' +

@@ -297,2 +299,25 @@ '</div>' +

});
this.e.addEventListener("focusout", function(event){
var select = new Date(Date.parse(this.value));
if(!isNaN(select.getDate())){
self.selectDate.call(self,
select.getFullYear(), select.getMonth(), select.getDate(),
select.getHours(), select.getMinutes(), select.getSeconds()
);
self.switchMonth.call(self, select.getMonth(), select.getFullYear());
}
});
this.e.addEventListener("keyup", function(event){
if(event.keyCode == 13){
var select = new Date(Date.parse(this.value));
if(!isNaN(select.getDate())){
self.selectDate.call(self,
select.getFullYear(), select.getMonth(), select.getDate(),
select.getHours(), select.getMinutes(), select.getSeconds()
);
self.switchMonth.call(self, select.getMonth(), select.getFullYear());
}
event.stopPropagation();
}
});
d.addEventListener("keyup", function(event){

@@ -404,3 +429,3 @@ if(tail.hasClass(self.dt, "calendar-open") && event.keyCode == 27){

| @since 0.1.0
| @update 0.3.0
| @update 0.3.3
*/

@@ -420,3 +445,3 @@ switchView: function(view){

this.dt.children[1].innerHTML = this.renderDay();
this.dt.querySelector(".calendar-label").innerText = str.months[this.view.date.getMonth()] + " " + this.view.date.getFullYear();
this.dt.querySelector(".calendar-label").innerText = __("months", this.view.date.getMonth()) + " " + this.view.date.getFullYear();

@@ -510,12 +535,12 @@ // Disable on Ranges

| @since 0.1.0
| @update 0.3.0
| @update 0.3.3
*/
renderDay: function(){
var start = str.shorts.indexOf(this.con.weekStart),
week = str.shorts.slice(start);
week = week.concat(str.shorts.slice(0, start));
var start = __("shorts").indexOf(this.con.weekStart),
week = __("shorts").slice(start);
week = week.concat(__("shorts").slice(0, start));
var content = '<table class="calendar-day"><thead><tr>';
for(var i = 0; i < 7; i++){
content += '<th data-tail-day="' + str.shorts.indexOf(week[i]) + '">' + week[i] + '</th>';
content += '<th data-tail-day="' + __("shorts").indexOf(week[i]) + '">' + week[i] + '</th>';
}

@@ -531,7 +556,7 @@ content += "</tr></thead><tbody>";

| @since 0.1.0
| @update 0.3.0
| @update 0.3.3
*/
renderMonth: function(){
var strings = str.months;
var content = '<table class="calendar-month"><thead><tr><th colspan="4">' + str.header[0] + '</th></tr></thead><tbody>';
var strings = __("months");
var content = '<table class="calendar-month"><thead><tr><th colspan="4">' + __("header", 0) + '</th></tr></thead><tbody>';
for(var i = 0; i < 12; i++){

@@ -551,3 +576,3 @@ content += '<tr>';

| @since 0.1.0
| @update 0.3.0
| @update 0.3.3
*/

@@ -558,11 +583,11 @@ renderTime: function(){

' <input type="number" value="' + new Date().getHours() + '" min="00" max="23" step="1" />' +
' <label>' + str.time[0] + '</label>' +
' <label>' + __("time", 0) + '</label>' +
'</div>' +
'<div class="calendar-field calendar-field-m">' +
' <input type="number" value="' + new Date().getMinutes() + '" min="00" max="59" step="1" />' +
' <label>' + str.time[1] + '</label>' +
' <label>' + __("time", 1) + '</label>' +
'</div>' +
'<div class="calendar-field calendar-field-s">' +
' <input type="number" value="' + new Date().getSeconds() + '" min="00" max="59" step="1" />' +
' <label>' + str.time[2] + '</label>' +
' <label>' + __("time", 2) + '</label>' +
'</div>';

@@ -658,4 +683,5 @@ },

remove: function(){
this.e.removeAttribute("data-fox-calendar");
this.td.parentElement.removeChild(this.td);
this.e.removeAttribute("data-tail-calendar");
this.e.removeAttribute("data-tail-value");
this.dt.parentElement.removeChild(this.dt);
return null;

@@ -665,2 +691,11 @@ },

/*
| ACTION :: REMOVE CALENDAR
| @since 0.3.3
*/
reload: function(){
this.remove();
return new tailDateTime(this.e, this.con);
},
/*
| ACTION :: SWITCH MONTH

@@ -743,3 +778,3 @@ | @since 0.1.0

| @since 0.1.0
| @update 0.3.1
| @update 0.3.3
*/

@@ -753,3 +788,3 @@ createCalendar: function(month, year){

// Calc start Day
startDay = startDay-str.shorts.indexOf(this.con.weekStart);
startDay = startDay-__("shorts").indexOf(this.con.weekStart);
if(startDay < 0){

@@ -827,3 +862,3 @@ startDay = 7 + startDay;

| @since 0.1.0
| @update 0.3.0
| @update 0.3.3
*/

@@ -844,7 +879,7 @@ convertDate: function(inDate, format){

m: String("00" + (inDate.getMonth() + 1)).toString().slice(-2),
M: str.months[inDate.getMonth()].slice(0, 3),
F: str.months[inDate.getMonth()],
M: __("months", [inDate.getMonth()]).slice(0, 3),
F: __("months", [inDate.getMonth()]),
d: String("00" + inDate.getDate()).toString().slice(-2),
D: str.days[inDate.getDay()],
l: str.shorts[inDate.getDay()].toLowerCase()
D: __("days", [inDate.getDay()]),
l: __("shorts", [inDate.getDay()]).toLowerCase()
};

@@ -877,2 +912,2 @@

w.tail.DateTime = tailDateTime;
})(window, document);
})(this);

@@ -1,2 +0,2 @@

/* tail.DateTime 0.3.2 @ https://github.com/pytesNET/tail.DateTime */
!function(n,l){"use strict";var o={hasClass:function(t,e){return new RegExp("(|s+)"+e+"(s+|)").test(t.className)},addClass:function(t,e){return this.hasClass(t,e)||(t.className=(t.className.trim()+" "+e.trim()).trim()),t},removeClass:function(t,e){var a=new RegExp("(|s+)("+e+")(s+|)");return a.test(t.className)&&(t.className=t.className.replace(a,"$1$3").trim()),t},trigger:function(t,e,a){if(CustomEvent&&"undefined"!=typeof CustomEvent){var s=new CustomEvent(e,a);return t.dispatchEvent(s)}return(s=l.createEvent("CustomEvent")).initCustomEvent(e,!!a.bubbles,!!a.cancelable,a.detail),t.dispatchEvent(s)}},h=function(t,e){if("string"==typeof t&&(t=l.querySelectorAll(t)),t instanceof NodeList||t instanceof HTMLCollection){if(0==t.length)return!1;for(var a=new Array,s=0;s<t.length;s++)a.push(new h(t[s],e));return 1==a.length?a[0]:a}if(void 0===this)return new h(t,e);if(!(t instanceof Element))return!1;if(t.hasAttribute("data-tail-calendar")&&h.instances[t.getAttribute("data-tail-calendar")])return h.instances[t.getAttribute("data-tail-calendar")];if("Object"==typeof e.dateRange&&e.dateRange instanceof Array&&(e.dateRanges=e.dateRange),delete e.dateRange,e.dateRanges&&0<e.dateRanges.length){var i;for(s=0;s<e.dateRanges.length;s++)"string"==typeof(i=e.dateRanges[s])[0]&&0<=u.shorts.indexOf(i[0])?(i[0]=u.shorts.indexOf(i[0]),i[1]=2<=i.length&&0<=u.shorts.indexOf(i[1])?u.shorts.indexOf(i[1]):6):("string"==typeof i[0]&&(i[0]=new Date(Date.parse(i[0])),2==i.length&&"string"==typeof i[1]?i[1]=new Date(Date.parse(i[1])):1==i.length&&(i[1]=new Date(i[0].getFullYear(),i[0].getMonth(),0))),i[0]instanceof Date&&!isNaN(i[0].getDate())||(i[0]=new Date),(i.length<2||!(i[1]instanceof Date)||isNaN(i[1].getDate()))&&(i[1]=new Date(i[0].getFullYear(),i[0].getMonth(),0)))}return u=n.tail.DateTime.strings,this.e=t,this.con=Object.assign({},h.defaults,"object"==typeof e?e:{}),this.init()};h.version="0.3.1",h.status="alpha",h.count=0,h.isIE11=!!window.MSInputMethodContext&&!!document.documentMode,h.cache={},h.instances={},h.defaults={static:null,position:"bottom",classNames:"",dateFormat:"YYYY-mm-dd",timeFormat:"HH:ii:ss",dateRanges:[],weekStart:"SUN",startOpen:!1,stayOpen:!1,zeroSeconds:!1},h.strings={months:["January","February","March","April","May","June","July","August","September","October","November","December"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shorts:["SUN","MON","TUE","WED","THU","FRI","SAT"],time:["Hours","Minutes","Seconds"],header:["Select a Month","Select a Year","Select a Time"]};var u=h.strings;h.prototype={e:null,dt:null,con:{},view:{},select:null,init:function(){if(this.dt)return this.dt;var t=l.querySelector(this.con.static);this.dt=l.createElement("DIV"),this.dt.id="data-tail-calendar-"+ ++h.count,this.dt.className="tail-datetime-calendar calendar-close"+(t?" calendar-static":""),this.con.stayOpen&&(this.dt.className+=" calendar-stay"),this.con.classNames&&(this.dt.className+=" "+(this.con.classNames instanceof Array?this.con.classNames.join(" "):this.con.classNames)),this.con.dateFormat?this.dt.innerHTML='<div class="calendar-navi"> <span data-tail-navi="prev" class="calendar-button button-prev"></span> <span data-tail-navi="switch" class="calendar-label"></span> <span data-tail-navi="next" class="calendar-button button-next"></span></div><div class="calendar-date"></div>'+(this.con.timeFormat?'<div class="calendar-time">'+this.renderTime()+"</div>":""):this.dt.innerHTML='<div class="calendar-navi"> <span data-tail-navi="check" class="calendar-button button-check"></span> <span data-tail-navi="switch" class="calendar-label">'+u.header[2]+'</span> <span data-tail-navi="close" class="calendar-button button-close"></span></div>'+(this.con.timeFormat?'<div class="calendar-time">'+this.renderTime()+"</div>":"");var e=new Date(Date.parse(this.e.getAttribute("data-tail-value")||this.e.value));this.view={type:"date",date:new Date,content:"",render:function(){return this.content.querySelector("tbody").innerHTML}},isNaN(e.getDate())||(this.select=e,this.con.zeroSeconds&&this.select.setSeconds(0),this.view.date=new Date(this.select.getTime())),this.con.timeFormat&&(this.dt.querySelector(".calendar-field-h > input").value=this.view.date.getHours(),this.dt.querySelector(".calendar-field-m > input").value=this.view.date.getMinutes(),this.dt.querySelector(".calendar-field-s > input").value=this.view.date.getSeconds()),this.switchMonth(this.view.date.getMonth(),this.view.date.getFullYear()),this.e.hasAttribute("data-tail-value")?this.selectDate():this.e.setAttribute("data-tail-value",this.convertDate(this.view.date,"YYYY-mm-dd HH:ii:ss")),this.dt.style.top=0,this.dt.style.left=0,this.dt.style.zIndex=99,this.dt.style.position=t?"static":"absolute",this.dt.style.visibility=t?"visible":"hidden",t?t.appendChild(this.dt):l.getElementsByTagName("body")[0].appendChild(this.dt);var s=this,a=this.dt.querySelectorAll("[data-tail-navi]");if(0<a.length)for(var i=0;i<a.length;i++)a[i].addEventListener("click",function(t){var e=this.getAttribute("data-tail-navi");s.con.dateFormat?"month"==s.view.type?"prev"==e||"next"==e?s.switchYear.call(s,e):s.switchView.call(s,"day"):"prev"==e||"next"==e?s.switchMonth.call(s,e):s.switchView.call(s,"month"):s.con.timeFormat&&("check"==e&&s.selectTime.call(s,parseInt(s.dt.querySelector(".calendar-field-h > input").value),parseInt(s.dt.querySelector(".calendar-field-m > input").value),parseInt(s.dt.querySelector(".calendar-field-s > input").value)),s.con.stayOpen||s.close.call(s))});return this.e.addEventListener("focusin",function(t){s.open.call(s)}),l.addEventListener("keyup",function(t){if(o.hasClass(s.dt,"calendar-open")&&27==t.keyCode&&(s.con.stayOpen||s.close.call(s),s.e.blur()),o.hasClass(s.dt,"calendar-open")&&13==t.keyCode){if(s.con.dateFormat){var e=s.dt.children[1].querySelector("td.today")||s.dt.children[1].querySelector("td:not(.empty)"),a=!!s.con.timeFormat;o.hasClass(e,"disabled")||s.selectDate.call(s,s.view.year,s.view.month,parseInt(e.value),a?parseInt(s.dt.querySelector(".calendar-field-h > input").value):0,a?parseInt(s.dt.querySelector(".calendar-field-m > input").value):0,a?parseInt(s.dt.querySelector(".calendar-field-s > input").value):0)}else s.selectTime.call(s,parseInt(s.dt.querySelector(".calendar-field-h > input").value),parseInt(s.dt.querySelector(".calendar-field-m > input").value),parseInt(s.dt.querySelector(".calendar-field-s > input").value));s.con.stayOpen||s.close.call(s),s.e.blur()}}),l.addEventListener("click",function(t){o.hasClass(s.dt,"calendar-open")&&(s.dt.contains(t.target)||s.e.contains(t.target)||t.target!=s.dt&&t.target!=s.e&&(s.con.stayOpen||s.close.call(s)))}),this.e.setAttribute("data-tail-calendar","tail-"+h.count),this.con.startOpen&&this.open(),h.instances["tail-"+h.count]=this},calcPosition:function(){if(o.hasClass(this.dt,"calendar-static"))return this;var t=n.getComputedStyle(this.dt),e=parseInt(t.marginLeft)+parseInt(t.marginRight),a=parseInt(t.marginTop)+parseInt(t.marginBottom),s=function(t){for(var e={top:t.offsetTop||0,left:t.offsetLeft||0,width:t.offsetWidth||0,height:t.offsetHeight||0};t=t.offsetParent;)e.top+=t.offsetTop,e.left+=t.offsetLeft;return e}(this.e);switch(this.dt.style.visibility="hidden",this.con.position){case"top":this.dt.style.top=s.top-(this.dt.offsetHeight+a)+"px",this.dt.style.left=s.left+s.width/2-(this.dt.offsetWidth/2+e/2)+"px";break;case"left":this.dt.style.top=s.top+s.height/2-(this.dt.offsetHeight/2+a)+"px",this.dt.style.left=s.left-(this.dt.offsetWidth+e)+"px";break;case"right":this.dt.style.top=s.top+s.height/2-(this.dt.offsetHeight/2+a)+"px",this.dt.style.left=s.left+s.width+"px";break;default:this.dt.style.top=s.top+s.height+"px",this.dt.style.left=s.left+s.width/2-(this.dt.offsetWidth/2+e/2)+"px"}return this.dt.style.visibility="visible",this},switchView:function(t){if(!this.con.dateFormat)return!1;if("month"==(this.view.type=t))this.dt.children[1].innerHTML="",this.dt.children[1].insertAdjacentHTML("afterbegin",this.renderMonth()),this.dt.querySelector(".calendar-label").innerText=this.view.date.getFullYear();else{this.dt.children[1].innerHTML=this.renderDay(),this.dt.querySelector(".calendar-label").innerText=u.months[this.view.date.getMonth()]+" "+this.view.date.getFullYear();var e=this.con.dateRanges,a=this.view.date,s=this.dt.querySelectorAll("tbody td:not(.empty)"),i=new Date(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0);if(0<e.length){for(var n=[],l=0;l<e.length;l++)if(e[l][0]instanceof Date){if(a.getYear()>=e[l][0].getYear()&&a.getYear()<=e[l][1].getYear()&&a.getMonth()>=e[l][0].getMonth()&&a.getMonth()<=e[l][1].getMonth())for(var r=0;r<s.length;r++)i.setDate(parseInt(s[r].innerText)),i>=e[l][0]&&i<=e[l][1]&&n.push(s[r].innerText)}else for(r=0;r<s.length;r++)i.setDate(parseInt(s[r].innerText)),3==e[l].length&&1==e[l][3]&&i.getDay()>=e[l][0]&&i.getDay()<=e[l][1]&&-1==n.indexOf(s[r].innerText)&&n.push(s[r].innerText),(i.getDay()<e[l][0]||i.getDay()>e[l][1])&&0<=n.indexOf(s[r].innerText)&&n.splice(n.indexOf(s[r].innerText),1);for(r=0;r<s.length;r++)-1==n.indexOf(s[r].innerText)&&o.addClass(s[r],"disable")}this.select instanceof Date&&this.select.getYear()==this.view.date.getYear()&&this.select.getMonth()==this.view.date.getMonth()?o.addClass(this.dt.querySelectorAll("tbody td:not(.empty)")[this.select.getDate()-1],"current"):this.dt.querySelector("tbody td.current")&&o.removeClass(this.dt.querySelector("tbody td.current"),"current")}var d=this;if(this.con.dateFormat){var c=this.dt.querySelectorAll("tbody td:not(.empty)");for(l=0;l<c.length;l++)c[l].addEventListener("click",function(t){if(t.preventDefault(),t.stopPropagation(),o.hasClass(this,"disable"))return!1;var e=!!d.con.timeFormat;"month"==d.view.type?d.switchMonth.call(d,parseInt(this.getAttribute("data-tail-month")),d.view.date.getFullYear()):(d.selectDate.call(d,d.view.date.getFullYear(),d.view.date.getMonth(),parseInt(this.innerText),e?parseInt(d.dt.querySelector(".calendar-field-h > input").value):0,e?parseInt(d.dt.querySelector(".calendar-field-m > input").value):0,e?parseInt(d.dt.querySelector(".calendar-field-s > input").value):0),d.con.stayOpen||d.close.call(d))})}},renderDay:function(){var t=u.shorts.indexOf(this.con.weekStart),e=u.shorts.slice(t);e=e.concat(u.shorts.slice(0,t));for(var a='<table class="calendar-day"><thead><tr>',s=0;s<7;s++)a+='<th data-tail-day="'+u.shorts.indexOf(e[s])+'">'+e[s]+"</th>";return a+="</tr></thead><tbody>",a+=this.createCalendar(this.view.date.getMonth(),this.view.date.getFullYear()).render(),a+="</tbody></table>"},renderMonth:function(){for(var t=u.months,e='<table class="calendar-month"><thead><tr><th colspan="4">'+u.header[0]+"</th></tr></thead><tbody>",a=0;a<12;a++)e+="<tr>",e+='<td class="calendar-month" data-tail-month="0"><span>'+t[a++]+"</span></td>",e+='<td class="calendar-month" data-tail-month="1"><span>'+t[a++]+"</span></td>",e+='<td class="calendar-month" data-tail-month="2"><span>'+t[a]+"</span></td>",e+="</tr>";return e+="</tbody></table>"},renderTime:function(){return'<div class="calendar-field calendar-field-h"> <input type="number" value="'+(new Date).getHours()+'" min="00" max="23" step="1" /> <label>'+u.time[0]+'</label></div><div class="calendar-field calendar-field-m"> <input type="number" value="'+(new Date).getMinutes()+'" min="00" max="59" step="1" /> <label>'+u.time[1]+'</label></div><div class="calendar-field calendar-field-s"> <input type="number" value="'+(new Date).getSeconds()+'" min="00" max="59" step="1" /> <label>'+u.time[2]+"</label></div>"},on:function(t,e){this.dt.addEventListener(t,e)},open:function(){return o.hasClass(this.dt,"calendar-close")&&(o.removeClass(this.dt,"calendar-close"),o.addClass(this.dt,"calendar-idle"),this.dt.style.opacity=0,this.dt.style.display="block",this.calcPosition(),this.animate=setInterval(function(t){t.dt.style.opacity=parseFloat(t.dt.style.opacity)+.1,1<=parseFloat(t.dt.style.opacity)&&(o.removeClass(t.dt,"calendar-idle"),o.addClass(t.dt,"calendar-open"),o.trigger(t.dt,"tail.DateTime::open",{bubbles:!1,cancelable:!0,detail:t}),clearInterval(t.animate))},10,this)),this},close:function(){return o.hasClass(this.dt,"calendar-open")&&(o.removeClass(this.dt,"calendar-open"),o.addClass(this.dt,"calendar-idle"),this.animate=setInterval(function(t){t.dt.style.opacity=parseFloat(t.dt.style.opacity)-.1,parseFloat(t.dt.style.opacity)<=0&&(o.removeClass(t.dt,"calendar-idle"),o.addClass(t.dt,"calendar-close"),o.trigger(t.dt,"tail.DateTime::close",{bubbles:!1,cancelable:!0,detail:t}),t.dt.style.display="none",clearInterval(t.animate))},10,this)),this},toggle:function(){return o.hasClass(this.dt,"calendar-open")?this.close():o.hasClass(this.dt,"calendar-close")?this.open():this},remove:function(){return this.e.removeAttribute("data-fox-calendar"),this.td.parentElement.removeChild(this.td),null},switchMonth:function(t,e){return"prev"==t?this.view.date.setMonth(this.view.date.getMonth()-1):"next"==t?this.view.date.setMonth(this.view.date.getMonth()+1):(this.view.date.setMonth(t),this.view.date.setFullYear(e)),this.switchView("day"),this},switchYear:function(t){return"prev"==t?this.view.date.setFullYear(this.view.date.getFullYear()-1):"next"==t?this.view.date.setFullYear(this.view.date.getFullYear()+1):this.view.date.setFullYear(t),this.switchView("month"),this},selectDate:function(t,e,a,s,i,n){var l=new Date,r=[this.con.dateFormat?this.con.dateFormat:"",this.con.timeFormat?this.con.timeFormat:""].join(" ").trim();return this.select=new Date(t||(null==t?this.view.date.getFullYear():l.getFullYear()),e||(null==e?this.view.date.getMonth():l.getMonth()),a||(null==a?this.view.date.getDate():l.getDate()),s||(null==s?this.view.date.getHours():0),i||(null==i?this.view.date.getMinutes():0),n||(null==n?this.view.date.getSeconds():0)),o.trigger(this.dt,"tail.DateTime::select",{bubbles:!1,cancelable:!0,detail:self}),this.e.value=this.convertDate(this.select,r),this.e.setAttribute("data-tail-value",this.convertDate(this.select,"YYYY-mm-dd HH:ii:ss")),this.switchView(this.view.type)},selectTime:function(t,e,a){return this.selectDate(!1,!1,!1,t,e,a)},createCalendar:function(t,e){var a=1,s=!0,i=new Date(e,t,a).getDay(),n=[31,e%4==0&&e%100!=0||e%400==0?29:28,31,30,31,30,31,31,30,31,30,31],l=[];if((i-=u.shorts.indexOf(this.con.weekStart))<0&&(i=7+i),h.cache[this.con.weekStart+"_"+e]&&!h.isIE11){if(h.cache[this.con.weekStart+"_"+e][t])return h.cache[this.con.weekStart+"_"+e][t]}else h.cache[this.con.weekStart+"_"+e]={};for(var r=0;s;){l[r]=[];for(var d=0;d<7;d++)0===r?d===i&&(l[r][d]="<span>"+a+++"</span>",i++):a<=n[t]?l[r][d]="<span>"+a+++"</span>":(l[r][d]="",s=!1),n[t]<a&&(s=!1);r++}for(r=0;r<l.length;r++)l[r]='<tr><td class="calendar-day">'+l[r].join('</td><td class="calendar-day">')+"</td></tr>";var c=document.createElement("table");c.className="calendar-current",c.innerHTML=l.join("");var o=c.querySelectorAll("td:empty");for(r=0;r<o.length;++r)o[r].className+=" empty";t==(new Date).getMonth()&&e==(new Date).getFullYear()&&Array.prototype.slice.call(c.querySelectorAll("td")).forEach(function(t,e,a){t.innerText===(new Date).getDate().toString()&&(t.className+=" today")});return this.view.date.setMonth(t),this.view.date.setFullYear(e),this.view=h.cache[this.con.weekStart+"_"+e][t]=Object.assign({},this.view,{content:c}),h.cache[this.con.weekStart+"_"+e][t]},convertDate:function(t,e){var a,s={H:String("00"+t.getHours()).toString().slice(-2),G:(a=t.getHours(),a%12?a%12:12),A:12<=t.getHours()?"PM":"AM",a:12<=t.getHours()?"pm":"am",i:String("00"+t.getMinutes()).toString().slice(-2),s:String("00"+t.getSeconds()).toString().slice(-2),Y:t.getFullYear(),y:parseInt(t.getFullYear().toString().slice(2)),m:String("00"+(t.getMonth()+1)).toString().slice(-2),M:u.months[t.getMonth()].slice(0,3),F:u.months[t.getMonth()],d:String("00"+t.getDate()).toString().slice(-2),D:u.days[t.getDay()],l:u.shorts[t.getDay()].toLowerCase()},i=new RegExp("(H{1,2}|G{1,2}|i{1,2}|s{1,2}|Y{2,4}|y{2}|m{1,2}|d{1,2})","g");return e=(e=e.replace(i,function(t){var e=s[t.slice(-1)].toString(),a=t.length;return 4==a||2==a?e.slice(-Math.abs(a)):1==a&&"0"==e[0]?e.slice(-1):e})).replace(/(A|a|M|F|D|l)/g,function(t){return s[t]})}},void 0===n.tail&&(n.tail={}),n.tail.DateTime=h}(window,document);
/* tail.DateTime 0.3.3 @ https://github.com/pytesNET/tail.DateTime */
!function(i){"use strict";var n=i.document,c={hasClass:function(t,e){return new RegExp("(|s+)"+e+"(s+|)").test(t.className)},addClass:function(t,e){return this.hasClass(t,e)||(t.className=(t.className.trim()+" "+e.trim()).trim()),t},removeClass:function(t,e){var a=new RegExp("(|s+)("+e+")(s+|)");return a.test(t.className)&&(t.className=t.className.replace(a,"$1$3").trim()),t},trigger:function(t,e,a){if(CustomEvent&&"undefined"!=typeof CustomEvent){var s=new CustomEvent(e,a);return t.dispatchEvent(s)}return(s=n.createEvent("CustomEvent")).initCustomEvent(e,!!a.bubbles,!!a.cancelable,a.detail),t.dispatchEvent(s)}},h=function(t,e){if("string"==typeof t&&(t=n.querySelectorAll(t)),t instanceof NodeList||t instanceof HTMLCollection){if(0==t.length)return!1;for(var a=new Array,s=0;s<t.length;s++)a.push(new h(t[s],e));return 1==a.length?a[0]:a}if(void 0===this)return new h(t,e);if(!(t instanceof Element))return!1;if(t.hasAttribute("data-tail-calendar")&&h.instances[t.getAttribute("data-tail-calendar")])return h.instances[t.getAttribute("data-tail-calendar")];if(e.dateRanges&&0<e.dateRanges.length){var i;for(s=0;s<e.dateRanges.length;s++)"string"==typeof(i=e.dateRanges[s])[0]&&0<=u("shorts").indexOf(i[0])?(i[0]=u("shorts").indexOf(i[0]),i[1]=2<=i.length&&0<=u("shorts").indexOf(i[1])?u("shorts").indexOf(i[1]):6):("string"==typeof i[0]&&(i[0]=new Date(Date.parse(i[0])),2==i.length&&"string"==typeof i[1]?i[1]=new Date(Date.parse(i[1])):1==i.length&&(i[1]=new Date(i[0].getFullYear(),i[0].getMonth(),0))),i[0]instanceof Date&&!isNaN(i[0].getDate())||(i[0]=new Date),(i.length<2||!(i[1]instanceof Date)||isNaN(i[1].getDate()))&&(i[1]=new Date(i[0].getFullYear(),i[0].getMonth(),0)))}return this.e=t,this.con=Object.assign({},h.defaults,"object"==typeof e?e:{}),this.init()};h.version="0.3.3",h.status="alpha",h.count=0,h.isIE11=!!window.MSInputMethodContext&&!!document.documentMode,h.cache={},h.instances={},h.defaults={static:null,position:"bottom",classNames:"",dateFormat:"YYYY-mm-dd",timeFormat:"HH:ii:ss",dateRanges:[],weekStart:"SUN",startOpen:!1,stayOpen:!1,zeroSeconds:!1},h.strings={months:["January","February","March","April","May","June","July","August","September","October","November","December"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shorts:["SUN","MON","TUE","WED","THU","FRI","SAT"],time:["Hours","Minutes","Seconds"],header:["Select a Month","Select a Year","Select a Time"]};var u=function(t,e){return t in i.tail.DateTime.strings&&(void 0!==e?i.tail.DateTime.strings[t][e]:i.tail.DateTime.strings[t])};h.prototype={e:null,dt:null,con:{},view:{},select:null,init:function(){if(this.dt)return this.dt;var t=n.querySelector(this.con.static);this.dt=n.createElement("DIV"),this.dt.id="data-tail-calendar-"+ ++h.count,this.dt.className="tail-datetime-calendar calendar-close"+(t?" calendar-static":""),this.con.stayOpen&&(this.dt.className+=" calendar-stay"),this.con.classNames&&(this.dt.className+=" "+(this.con.classNames instanceof Array?this.con.classNames.join(" "):this.con.classNames)),this.con.dateFormat?this.dt.innerHTML='<div class="calendar-navi"> <span data-tail-navi="prev" class="calendar-button button-prev"></span> <span data-tail-navi="switch" class="calendar-label"></span> <span data-tail-navi="next" class="calendar-button button-next"></span></div><div class="calendar-date"></div>'+(this.con.timeFormat?'<div class="calendar-time">'+this.renderTime()+"</div>":""):this.dt.innerHTML='<div class="calendar-navi"> <span data-tail-navi="check" class="calendar-button button-check"></span> <span data-tail-navi="switch" class="calendar-label">'+u("header",2)+'</span> <span data-tail-navi="close" class="calendar-button button-close"></span></div>'+(this.con.timeFormat?'<div class="calendar-time">'+this.renderTime()+"</div>":"");var e=new Date(Date.parse(this.e.getAttribute("data-tail-value")||this.e.value));this.view={type:"date",date:new Date,content:"",render:function(){return this.content.querySelector("tbody").innerHTML}},isNaN(e.getDate())||(this.select=e,this.con.zeroSeconds&&this.select.setSeconds(0),this.view.date=new Date(this.select.getTime())),this.con.timeFormat&&(this.dt.querySelector(".calendar-field-h > input").value=this.view.date.getHours(),this.dt.querySelector(".calendar-field-m > input").value=this.view.date.getMinutes(),this.dt.querySelector(".calendar-field-s > input").value=this.view.date.getSeconds()),this.switchMonth(this.view.date.getMonth(),this.view.date.getFullYear()),this.e.hasAttribute("data-tail-value")?this.selectDate():this.e.setAttribute("data-tail-value",this.convertDate(this.view.date,"YYYY-mm-dd HH:ii:ss")),this.dt.style.top=0,this.dt.style.left=0,this.dt.style.zIndex=99,this.dt.style.position=t?"static":"absolute",this.dt.style.visibility=t?"visible":"hidden",t?t.appendChild(this.dt):n.getElementsByTagName("body")[0].appendChild(this.dt);var s=this,a=this.dt.querySelectorAll("[data-tail-navi]");if(0<a.length)for(var i=0;i<a.length;i++)a[i].addEventListener("click",function(t){var e=this.getAttribute("data-tail-navi");s.con.dateFormat?"month"==s.view.type?"prev"==e||"next"==e?s.switchYear.call(s,e):s.switchView.call(s,"day"):"prev"==e||"next"==e?s.switchMonth.call(s,e):s.switchView.call(s,"month"):s.con.timeFormat&&("check"==e&&s.selectTime.call(s,parseInt(s.dt.querySelector(".calendar-field-h > input").value),parseInt(s.dt.querySelector(".calendar-field-m > input").value),parseInt(s.dt.querySelector(".calendar-field-s > input").value)),s.con.stayOpen||s.close.call(s))});return this.e.addEventListener("focusin",function(t){s.open.call(s)}),this.e.addEventListener("focusout",function(t){var e=new Date(Date.parse(this.value));isNaN(e.getDate())||(s.selectDate.call(s,e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds()),s.switchMonth.call(s,e.getMonth(),e.getFullYear()))}),this.e.addEventListener("keyup",function(t){if(13==t.keyCode){var e=new Date(Date.parse(this.value));isNaN(e.getDate())||(s.selectDate.call(s,e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds()),s.switchMonth.call(s,e.getMonth(),e.getFullYear())),t.stopPropagation()}}),n.addEventListener("keyup",function(t){if(c.hasClass(s.dt,"calendar-open")&&27==t.keyCode&&(s.con.stayOpen||s.close.call(s),s.e.blur()),c.hasClass(s.dt,"calendar-open")&&13==t.keyCode){if(s.con.dateFormat){var e=s.dt.children[1].querySelector("td.today")||s.dt.children[1].querySelector("td:not(.empty)"),a=!!s.con.timeFormat;c.hasClass(e,"disabled")||s.selectDate.call(s,s.view.year,s.view.month,parseInt(e.value),a?parseInt(s.dt.querySelector(".calendar-field-h > input").value):0,a?parseInt(s.dt.querySelector(".calendar-field-m > input").value):0,a?parseInt(s.dt.querySelector(".calendar-field-s > input").value):0)}else s.selectTime.call(s,parseInt(s.dt.querySelector(".calendar-field-h > input").value),parseInt(s.dt.querySelector(".calendar-field-m > input").value),parseInt(s.dt.querySelector(".calendar-field-s > input").value));s.con.stayOpen||s.close.call(s),s.e.blur()}}),n.addEventListener("click",function(t){c.hasClass(s.dt,"calendar-open")&&(s.dt.contains(t.target)||s.e.contains(t.target)||t.target!=s.dt&&t.target!=s.e&&(s.con.stayOpen||s.close.call(s)))}),this.e.setAttribute("data-tail-calendar","tail-"+h.count),this.con.startOpen&&this.open(),h.instances["tail-"+h.count]=this},calcPosition:function(){if(c.hasClass(this.dt,"calendar-static"))return this;var t=i.getComputedStyle(this.dt),e=parseInt(t.marginLeft)+parseInt(t.marginRight),a=parseInt(t.marginTop)+parseInt(t.marginBottom),s=function(t){for(var e={top:t.offsetTop||0,left:t.offsetLeft||0,width:t.offsetWidth||0,height:t.offsetHeight||0};t=t.offsetParent;)e.top+=t.offsetTop,e.left+=t.offsetLeft;return e}(this.e);switch(this.dt.style.visibility="hidden",this.con.position){case"top":this.dt.style.top=s.top-(this.dt.offsetHeight+a)+"px",this.dt.style.left=s.left+s.width/2-(this.dt.offsetWidth/2+e/2)+"px";break;case"left":this.dt.style.top=s.top+s.height/2-(this.dt.offsetHeight/2+a)+"px",this.dt.style.left=s.left-(this.dt.offsetWidth+e)+"px";break;case"right":this.dt.style.top=s.top+s.height/2-(this.dt.offsetHeight/2+a)+"px",this.dt.style.left=s.left+s.width+"px";break;default:this.dt.style.top=s.top+s.height+"px",this.dt.style.left=s.left+s.width/2-(this.dt.offsetWidth/2+e/2)+"px"}return this.dt.style.visibility="visible",this},switchView:function(t){if(!this.con.dateFormat)return!1;if("month"==(this.view.type=t))this.dt.children[1].innerHTML="",this.dt.children[1].insertAdjacentHTML("afterbegin",this.renderMonth()),this.dt.querySelector(".calendar-label").innerText=this.view.date.getFullYear();else{this.dt.children[1].innerHTML=this.renderDay(),this.dt.querySelector(".calendar-label").innerText=u("months",this.view.date.getMonth())+" "+this.view.date.getFullYear();var e=this.con.dateRanges,a=this.view.date,s=this.dt.querySelectorAll("tbody td:not(.empty)"),i=new Date(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0);if(0<e.length){for(var n=[],l=0;l<e.length;l++)if(e[l][0]instanceof Date){if(a.getYear()>=e[l][0].getYear()&&a.getYear()<=e[l][1].getYear()&&a.getMonth()>=e[l][0].getMonth()&&a.getMonth()<=e[l][1].getMonth())for(var r=0;r<s.length;r++)i.setDate(parseInt(s[r].innerText)),i>=e[l][0]&&i<=e[l][1]&&n.push(s[r].innerText)}else for(r=0;r<s.length;r++)i.setDate(parseInt(s[r].innerText)),3==e[l].length&&1==e[l][3]&&i.getDay()>=e[l][0]&&i.getDay()<=e[l][1]&&-1==n.indexOf(s[r].innerText)&&n.push(s[r].innerText),(i.getDay()<e[l][0]||i.getDay()>e[l][1])&&0<=n.indexOf(s[r].innerText)&&n.splice(n.indexOf(s[r].innerText),1);for(r=0;r<s.length;r++)-1==n.indexOf(s[r].innerText)&&c.addClass(s[r],"disable")}this.select instanceof Date&&this.select.getYear()==this.view.date.getYear()&&this.select.getMonth()==this.view.date.getMonth()?c.addClass(this.dt.querySelectorAll("tbody td:not(.empty)")[this.select.getDate()-1],"current"):this.dt.querySelector("tbody td.current")&&c.removeClass(this.dt.querySelector("tbody td.current"),"current")}var d=this;if(this.con.dateFormat){var o=this.dt.querySelectorAll("tbody td:not(.empty)");for(l=0;l<o.length;l++)o[l].addEventListener("click",function(t){if(t.preventDefault(),t.stopPropagation(),c.hasClass(this,"disable"))return!1;var e=!!d.con.timeFormat;"month"==d.view.type?d.switchMonth.call(d,parseInt(this.getAttribute("data-tail-month")),d.view.date.getFullYear()):(d.selectDate.call(d,d.view.date.getFullYear(),d.view.date.getMonth(),parseInt(this.innerText),e?parseInt(d.dt.querySelector(".calendar-field-h > input").value):0,e?parseInt(d.dt.querySelector(".calendar-field-m > input").value):0,e?parseInt(d.dt.querySelector(".calendar-field-s > input").value):0),d.con.stayOpen||d.close.call(d))})}},renderDay:function(){var t=u("shorts").indexOf(this.con.weekStart),e=u("shorts").slice(t);e=e.concat(u("shorts").slice(0,t));for(var a='<table class="calendar-day"><thead><tr>',s=0;s<7;s++)a+='<th data-tail-day="'+u("shorts").indexOf(e[s])+'">'+e[s]+"</th>";return a+="</tr></thead><tbody>",a+=this.createCalendar(this.view.date.getMonth(),this.view.date.getFullYear()).render(),a+="</tbody></table>"},renderMonth:function(){for(var t=u("months"),e='<table class="calendar-month"><thead><tr><th colspan="4">'+u("header",0)+"</th></tr></thead><tbody>",a=0;a<12;a++)e+="<tr>",e+='<td class="calendar-month" data-tail-month="0"><span>'+t[a++]+"</span></td>",e+='<td class="calendar-month" data-tail-month="1"><span>'+t[a++]+"</span></td>",e+='<td class="calendar-month" data-tail-month="2"><span>'+t[a]+"</span></td>",e+="</tr>";return e+="</tbody></table>"},renderTime:function(){return'<div class="calendar-field calendar-field-h"> <input type="number" value="'+(new Date).getHours()+'" min="00" max="23" step="1" /> <label>'+u("time",0)+'</label></div><div class="calendar-field calendar-field-m"> <input type="number" value="'+(new Date).getMinutes()+'" min="00" max="59" step="1" /> <label>'+u("time",1)+'</label></div><div class="calendar-field calendar-field-s"> <input type="number" value="'+(new Date).getSeconds()+'" min="00" max="59" step="1" /> <label>'+u("time",2)+"</label></div>"},on:function(t,e){this.dt.addEventListener(t,e)},open:function(){return c.hasClass(this.dt,"calendar-close")&&(c.removeClass(this.dt,"calendar-close"),c.addClass(this.dt,"calendar-idle"),this.dt.style.opacity=0,this.dt.style.display="block",this.calcPosition(),this.animate=setInterval(function(t){t.dt.style.opacity=parseFloat(t.dt.style.opacity)+.1,1<=parseFloat(t.dt.style.opacity)&&(c.removeClass(t.dt,"calendar-idle"),c.addClass(t.dt,"calendar-open"),c.trigger(t.dt,"tail.DateTime::open",{bubbles:!1,cancelable:!0,detail:t}),clearInterval(t.animate))},10,this)),this},close:function(){return c.hasClass(this.dt,"calendar-open")&&(c.removeClass(this.dt,"calendar-open"),c.addClass(this.dt,"calendar-idle"),this.animate=setInterval(function(t){t.dt.style.opacity=parseFloat(t.dt.style.opacity)-.1,parseFloat(t.dt.style.opacity)<=0&&(c.removeClass(t.dt,"calendar-idle"),c.addClass(t.dt,"calendar-close"),c.trigger(t.dt,"tail.DateTime::close",{bubbles:!1,cancelable:!0,detail:t}),t.dt.style.display="none",clearInterval(t.animate))},10,this)),this},toggle:function(){return c.hasClass(this.dt,"calendar-open")?this.close():c.hasClass(this.dt,"calendar-close")?this.open():this},remove:function(){return this.e.removeAttribute("data-tail-calendar"),this.e.removeAttribute("data-tail-value"),this.dt.parentElement.removeChild(this.dt),null},reload:function(){return this.remove(),new h(this.e,this.con)},switchMonth:function(t,e){return"prev"==t?this.view.date.setMonth(this.view.date.getMonth()-1):"next"==t?this.view.date.setMonth(this.view.date.getMonth()+1):(this.view.date.setMonth(t),this.view.date.setFullYear(e)),this.switchView("day"),this},switchYear:function(t){return"prev"==t?this.view.date.setFullYear(this.view.date.getFullYear()-1):"next"==t?this.view.date.setFullYear(this.view.date.getFullYear()+1):this.view.date.setFullYear(t),this.switchView("month"),this},selectDate:function(t,e,a,s,i,n){var l=new Date,r=[this.con.dateFormat?this.con.dateFormat:"",this.con.timeFormat?this.con.timeFormat:""].join(" ").trim();return this.select=new Date(t||(null==t?this.view.date.getFullYear():l.getFullYear()),e||(null==e?this.view.date.getMonth():l.getMonth()),a||(null==a?this.view.date.getDate():l.getDate()),s||(null==s?this.view.date.getHours():0),i||(null==i?this.view.date.getMinutes():0),n||(null==n?this.view.date.getSeconds():0)),c.trigger(this.dt,"tail.DateTime::select",{bubbles:!1,cancelable:!0,detail:self}),this.e.value=this.convertDate(this.select,r),this.e.setAttribute("data-tail-value",this.convertDate(this.select,"YYYY-mm-dd HH:ii:ss")),this.switchView(this.view.type)},selectTime:function(t,e,a){return this.selectDate(!1,!1,!1,t,e,a)},createCalendar:function(t,e){var a=1,s=!0,i=new Date(e,t,a).getDay(),n=[31,e%4==0&&e%100!=0||e%400==0?29:28,31,30,31,30,31,31,30,31,30,31],l=[];if((i-=u("shorts").indexOf(this.con.weekStart))<0&&(i=7+i),h.cache[this.con.weekStart+"_"+e]&&!h.isIE11){if(h.cache[this.con.weekStart+"_"+e][t])return h.cache[this.con.weekStart+"_"+e][t]}else h.cache[this.con.weekStart+"_"+e]={};for(var r=0;s;){l[r]=[];for(var d=0;d<7;d++)0===r?d===i&&(l[r][d]="<span>"+a+++"</span>",i++):a<=n[t]?l[r][d]="<span>"+a+++"</span>":(l[r][d]="",s=!1),n[t]<a&&(s=!1);r++}for(r=0;r<l.length;r++)l[r]='<tr><td class="calendar-day">'+l[r].join('</td><td class="calendar-day">')+"</td></tr>";var o=document.createElement("table");o.className="calendar-current",o.innerHTML=l.join("");var c=o.querySelectorAll("td:empty");for(r=0;r<c.length;++r)c[r].className+=" empty";t==(new Date).getMonth()&&e==(new Date).getFullYear()&&Array.prototype.slice.call(o.querySelectorAll("td")).forEach(function(t,e,a){t.innerText===(new Date).getDate().toString()&&(t.className+=" today")});return this.view.date.setMonth(t),this.view.date.setFullYear(e),this.view=h.cache[this.con.weekStart+"_"+e][t]=Object.assign({},this.view,{content:o}),h.cache[this.con.weekStart+"_"+e][t]},convertDate:function(t,e){var a,s={H:String("00"+t.getHours()).toString().slice(-2),G:(a=t.getHours(),a%12?a%12:12),A:12<=t.getHours()?"PM":"AM",a:12<=t.getHours()?"pm":"am",i:String("00"+t.getMinutes()).toString().slice(-2),s:String("00"+t.getSeconds()).toString().slice(-2),Y:t.getFullYear(),y:parseInt(t.getFullYear().toString().slice(2)),m:String("00"+(t.getMonth()+1)).toString().slice(-2),M:u("months",[t.getMonth()]).slice(0,3),F:u("months",[t.getMonth()]),d:String("00"+t.getDate()).toString().slice(-2),D:u("days",[t.getDay()]),l:u("shorts",[t.getDay()]).toLowerCase()},i=new RegExp("(H{1,2}|G{1,2}|i{1,2}|s{1,2}|Y{2,4}|y{2}|m{1,2}|d{1,2})","g");return e=(e=e.replace(i,function(t){var e=s[t.slice(-1)].toString(),a=t.length;return 4==a||2==a?e.slice(-Math.abs(a)):1==a&&"0"==e[0]?e.slice(-1):e})).replace(/(A|a|M|F|D|l)/g,function(t){return s[t]})}},void 0===i.tail&&(i.tail={}),i.tail.DateTime=h}(this);

@@ -9,2 +9,2 @@ ;(function(w){

};
})(window);
})(this);

@@ -9,2 +9,2 @@ ;(function(w){

};
})(window);
})(this);

@@ -9,2 +9,2 @@ ;(function(w){

};
})(window);
})(this);
{
"name": "tail.datetime",
"version": "0.3.2",
"version": "0.3.3",
"description": "A light-weight, translat- and configurable Open Source DateTime Picker, written in pure vanilla JavaScript!",

@@ -12,3 +12,3 @@ "main": "js/tail.datetime.js",

"keywords": [
"datetime-picker", "datetime", "date", "time", "picker", "calendar"
"datetime-picker", "datetime", "date", "time", "picker", "calendar", "form"
],

@@ -15,0 +15,0 @@ "author": "SamBrishes, pytesNET",

tail.DateTime
=============
> Version: 0.3.2 (Alpha)<br />
> Version: 0.3.3 (Alpha)<br />
> License: X11 / MIT<br />

@@ -5,0 +5,0 @@ > Author: SamBrishes, pytesNET & MrGuiseppe

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc