datatables.net-datetime 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dataTables.dateTime.css +203 -162
- package/dist/dataTables.dateTime.js +6 -5
- package/dist/dataTables.dateTime.min.js +31 -31
- package/gulpfile.js +1 -1
- package/js/dataTables.dateTime.js +6 -5
- package/make.sh +2 -2
- package/nuget.nuspec +1 -1
- package/package.json +3 -2
- package/datatables.net-datetime.1.1.0.nupkg +0 -0
|
@@ -5,167 +5,207 @@ div.dt-datetime {
|
|
|
5
5
|
border: 1px solid #ccc;
|
|
6
6
|
box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.5);
|
|
7
7
|
padding: 0 20px 6px 20px;
|
|
8
|
-
width: 275px;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
8
|
+
width: 275px;
|
|
9
|
+
}
|
|
10
|
+
div.dt-datetime.inline {
|
|
11
|
+
position: relative;
|
|
12
|
+
box-shadow: none;
|
|
13
|
+
}
|
|
14
|
+
div.dt-datetime div.dt-datetime-title {
|
|
15
|
+
text-align: center;
|
|
16
|
+
padding: 5px 0px 3px;
|
|
17
|
+
}
|
|
18
|
+
div.dt-datetime div.dt-datetime-buttons {
|
|
19
|
+
text-align: center;
|
|
20
|
+
}
|
|
21
|
+
div.dt-datetime div.dt-datetime-buttons a {
|
|
22
|
+
display: inline-block;
|
|
23
|
+
padding: 0 0.5em 0.5em 0.5em;
|
|
24
|
+
margin: 0;
|
|
25
|
+
font-size: 0.9em;
|
|
26
|
+
}
|
|
27
|
+
div.dt-datetime div.dt-datetime-buttons a:hover {
|
|
28
|
+
text-decoration: underline;
|
|
29
|
+
}
|
|
30
|
+
div.dt-datetime table {
|
|
31
|
+
border-spacing: 0;
|
|
32
|
+
margin: 12px 0;
|
|
33
|
+
width: 100%;
|
|
34
|
+
}
|
|
35
|
+
div.dt-datetime table.dt-datetime-table-nospace {
|
|
36
|
+
margin-top: -12px;
|
|
37
|
+
}
|
|
38
|
+
div.dt-datetime table th {
|
|
39
|
+
font-size: 0.8em;
|
|
40
|
+
color: #777;
|
|
41
|
+
font-weight: normal;
|
|
42
|
+
width: 14.285714286%;
|
|
43
|
+
padding: 0 0 4px 0;
|
|
44
|
+
text-align: center;
|
|
45
|
+
}
|
|
46
|
+
div.dt-datetime table td {
|
|
47
|
+
font-size: 0.9em;
|
|
48
|
+
color: #444;
|
|
49
|
+
padding: 0;
|
|
50
|
+
}
|
|
51
|
+
div.dt-datetime table td.selectable {
|
|
52
|
+
text-align: center;
|
|
53
|
+
background: #f5f5f5;
|
|
54
|
+
}
|
|
55
|
+
div.dt-datetime table td.selectable.disabled {
|
|
56
|
+
color: #aaa;
|
|
57
|
+
background: white;
|
|
58
|
+
}
|
|
59
|
+
div.dt-datetime table td.selectable.disabled button:hover {
|
|
60
|
+
color: #aaa;
|
|
61
|
+
background: white;
|
|
62
|
+
}
|
|
63
|
+
div.dt-datetime table td.selectable.now {
|
|
64
|
+
background-color: #ddd;
|
|
65
|
+
}
|
|
66
|
+
div.dt-datetime table td.selectable.now button {
|
|
67
|
+
font-weight: bold;
|
|
68
|
+
}
|
|
69
|
+
div.dt-datetime table td.selectable.selected button {
|
|
70
|
+
background: #4E6CA3;
|
|
71
|
+
color: white;
|
|
72
|
+
border-radius: 2px;
|
|
73
|
+
}
|
|
74
|
+
div.dt-datetime table td.selectable button:hover {
|
|
75
|
+
background: #ff8000;
|
|
76
|
+
color: white;
|
|
77
|
+
border-radius: 2px;
|
|
78
|
+
}
|
|
79
|
+
div.dt-datetime table td.dt-datetime-week {
|
|
80
|
+
font-size: 0.7em;
|
|
81
|
+
}
|
|
82
|
+
div.dt-datetime table button {
|
|
83
|
+
width: 100%;
|
|
84
|
+
box-sizing: border-box;
|
|
85
|
+
border: none;
|
|
86
|
+
background: transparent;
|
|
87
|
+
font-size: inherit;
|
|
88
|
+
color: inherit;
|
|
89
|
+
text-align: center;
|
|
90
|
+
padding: 4px 0;
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
margin: 0;
|
|
93
|
+
}
|
|
94
|
+
div.dt-datetime table button span {
|
|
95
|
+
display: inline-block;
|
|
96
|
+
min-width: 14px;
|
|
97
|
+
text-align: right;
|
|
98
|
+
}
|
|
99
|
+
div.dt-datetime table.weekNumber th {
|
|
100
|
+
width: 12.5%;
|
|
101
|
+
}
|
|
102
|
+
div.dt-datetime div.dt-datetime-calendar table {
|
|
103
|
+
margin-top: 0;
|
|
104
|
+
}
|
|
105
|
+
div.dt-datetime div.dt-datetime-label {
|
|
106
|
+
position: relative;
|
|
107
|
+
display: inline-block;
|
|
108
|
+
height: 30px;
|
|
109
|
+
padding: 5px 6px;
|
|
110
|
+
border: 1px solid transparent;
|
|
111
|
+
box-sizing: border-box;
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
}
|
|
114
|
+
div.dt-datetime div.dt-datetime-label:hover {
|
|
115
|
+
border: 1px solid #ddd;
|
|
116
|
+
border-radius: 2px;
|
|
117
|
+
background-color: #f5f5f5;
|
|
118
|
+
}
|
|
119
|
+
div.dt-datetime div.dt-datetime-label select {
|
|
120
|
+
position: absolute;
|
|
121
|
+
top: 6px;
|
|
122
|
+
left: 0;
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
opacity: 0;
|
|
125
|
+
}
|
|
126
|
+
div.dt-datetime.horizontal {
|
|
127
|
+
width: 550px;
|
|
128
|
+
}
|
|
129
|
+
div.dt-datetime.horizontal div.dt-datetime-date,
|
|
130
|
+
div.dt-datetime.horizontal div.dt-datetime-time {
|
|
131
|
+
width: 48%;
|
|
132
|
+
}
|
|
133
|
+
div.dt-datetime.horizontal div.dt-datetime-time {
|
|
134
|
+
margin-left: 4%;
|
|
135
|
+
}
|
|
136
|
+
div.dt-datetime div.dt-datetime-date {
|
|
137
|
+
position: relative;
|
|
138
|
+
float: left;
|
|
139
|
+
width: 100%;
|
|
140
|
+
}
|
|
141
|
+
div.dt-datetime div.dt-datetime-time {
|
|
142
|
+
position: relative;
|
|
143
|
+
float: left;
|
|
144
|
+
width: 100%;
|
|
145
|
+
text-align: center;
|
|
146
|
+
}
|
|
147
|
+
div.dt-datetime div.dt-datetime-time > span {
|
|
148
|
+
vertical-align: middle;
|
|
149
|
+
}
|
|
150
|
+
div.dt-datetime div.dt-datetime-time th {
|
|
151
|
+
text-align: left;
|
|
152
|
+
}
|
|
153
|
+
div.dt-datetime div.dt-datetime-time div.dt-datetime-timeblock {
|
|
154
|
+
display: inline-block;
|
|
155
|
+
vertical-align: middle;
|
|
156
|
+
}
|
|
157
|
+
div.dt-datetime div.dt-datetime-iconLeft,
|
|
158
|
+
div.dt-datetime div.dt-datetime-iconRight,
|
|
159
|
+
div.dt-datetime div.dt-datetime-iconUp,
|
|
160
|
+
div.dt-datetime div.dt-datetime-iconDown {
|
|
161
|
+
width: 30px;
|
|
162
|
+
height: 30px;
|
|
163
|
+
background-position: center;
|
|
164
|
+
background-repeat: no-repeat;
|
|
165
|
+
opacity: 0.3;
|
|
166
|
+
overflow: hidden;
|
|
167
|
+
box-sizing: border-box;
|
|
168
|
+
}
|
|
169
|
+
div.dt-datetime div.dt-datetime-iconLeft:hover,
|
|
170
|
+
div.dt-datetime div.dt-datetime-iconRight:hover,
|
|
171
|
+
div.dt-datetime div.dt-datetime-iconUp:hover,
|
|
172
|
+
div.dt-datetime div.dt-datetime-iconDown:hover {
|
|
173
|
+
border: 1px solid #ccc;
|
|
174
|
+
border-radius: 2px;
|
|
175
|
+
background-color: #f0f0f0;
|
|
176
|
+
opacity: 0.6;
|
|
177
|
+
}
|
|
178
|
+
div.dt-datetime div.dt-datetime-iconLeft button,
|
|
179
|
+
div.dt-datetime div.dt-datetime-iconRight button,
|
|
180
|
+
div.dt-datetime div.dt-datetime-iconUp button,
|
|
181
|
+
div.dt-datetime div.dt-datetime-iconDown button {
|
|
182
|
+
border: none;
|
|
183
|
+
background: transparent;
|
|
184
|
+
text-indent: 30px;
|
|
185
|
+
height: 100%;
|
|
186
|
+
width: 100%;
|
|
187
|
+
cursor: pointer;
|
|
188
|
+
}
|
|
189
|
+
div.dt-datetime div.dt-datetime-iconLeft {
|
|
190
|
+
position: absolute;
|
|
191
|
+
top: 5px;
|
|
192
|
+
left: 5px;
|
|
193
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg==");
|
|
194
|
+
}
|
|
195
|
+
div.dt-datetime div.dt-datetime-iconRight {
|
|
196
|
+
position: absolute;
|
|
197
|
+
top: 5px;
|
|
198
|
+
right: 5px;
|
|
199
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII=");
|
|
200
|
+
}
|
|
201
|
+
div.dt-datetime div.dt-datetime-iconUp {
|
|
202
|
+
height: 20px;
|
|
203
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAALCAMAAABf9c24AAAAFVBMVEX///99fX1+fn57e3t6enoAAAAAAAC73bqPAAAABnRSTlMAYmJkZt92bnysAAAAL0lEQVR4AWOgJmBhxCvLyopHnpmVjY2VCadeoCxIHrcsWJ4RlyxCHlMWCTBRJxwAjrIBDMWSiM0AAAAASUVORK5CYII=");
|
|
204
|
+
}
|
|
205
|
+
div.dt-datetime div.dt-datetime-iconDown {
|
|
206
|
+
height: 20px;
|
|
207
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAALCAMAAABf9c24AAAAFVBMVEX///99fX1+fn57e3t6enoAAAAAAAC73bqPAAAABnRSTlMAYmJkZt92bnysAAAAMElEQVR4AWOgDmBiRQIsmPKMrGxQgJDFlEfIYpoPk8Utz8qM232MYFfhkQfKUg8AANefAQxecJ58AAAAAElFTkSuQmCC");
|
|
208
|
+
}
|
|
169
209
|
|
|
170
210
|
div.dt-datetime-error {
|
|
171
211
|
clear: both;
|
|
@@ -174,4 +214,5 @@ div.dt-datetime-error {
|
|
|
174
214
|
font-size: 11px;
|
|
175
215
|
line-height: 1.25em;
|
|
176
216
|
text-align: center;
|
|
177
|
-
color: #b11f1f;
|
|
217
|
+
color: #b11f1f;
|
|
218
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! DateTime picker for DataTables.net v1.1.
|
|
1
|
+
/*! DateTime picker for DataTables.net v1.1.2
|
|
2
2
|
*
|
|
3
3
|
* © SpryMedia Ltd, all rights reserved.
|
|
4
4
|
* License: MIT datatables.net/license/mit
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @summary DateTime picker for DataTables.net
|
|
9
|
-
* @version 1.1.
|
|
9
|
+
* @version 1.1.2
|
|
10
10
|
* @file dataTables.dateTime.js
|
|
11
11
|
* @author SpryMedia Ltd
|
|
12
12
|
* @contact www.datatables.net/contact
|
|
@@ -102,10 +102,10 @@ var DateTime = function ( input, opts ) {
|
|
|
102
102
|
'<div class="'+classPrefix+'-date">'+
|
|
103
103
|
'<div class="'+classPrefix+'-title">'+
|
|
104
104
|
'<div class="'+classPrefix+'-iconLeft">'+
|
|
105
|
-
'<button title="'+i18n.previous+'">'+i18n.previous+'</button>'+
|
|
105
|
+
'<button type="button" title="'+i18n.previous+'">'+i18n.previous+'</button>'+
|
|
106
106
|
'</div>'+
|
|
107
107
|
'<div class="'+classPrefix+'-iconRight">'+
|
|
108
|
-
'<button title="'+i18n.next+'">'+i18n.next+'</button>'+
|
|
108
|
+
'<button type="button" title="'+i18n.next+'">'+i18n.next+'</button>'+
|
|
109
109
|
'</div>'+
|
|
110
110
|
'<div class="'+classPrefix+'-label">'+
|
|
111
111
|
'<span></span>'+
|
|
@@ -740,6 +740,7 @@ $.extend( DateTime.prototype, {
|
|
|
740
740
|
$('div.dataTables_scrollBody').off( 'scroll.'+namespace );
|
|
741
741
|
$('div.DTE_Body_Content').off( 'scroll.'+namespace );
|
|
742
742
|
$('body').off( 'click.'+namespace );
|
|
743
|
+
$(this.dom.input[0].offsetParent).off('.'+namespace);
|
|
743
744
|
},
|
|
744
745
|
|
|
745
746
|
/**
|
|
@@ -1534,7 +1535,7 @@ DateTime.defaults = {
|
|
|
1534
1535
|
yearRange: 25
|
|
1535
1536
|
};
|
|
1536
1537
|
|
|
1537
|
-
DateTime.version = '1.1.
|
|
1538
|
+
DateTime.version = '1.1.2';
|
|
1538
1539
|
|
|
1539
1540
|
// Global export - if no conflicts
|
|
1540
1541
|
if (! window.DateTime) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
DateTime picker for DataTables.net v1.1.
|
|
2
|
+
DateTime picker for DataTables.net v1.1.2
|
|
3
3
|
|
|
4
4
|
© SpryMedia Ltd, all rights reserved.
|
|
5
5
|
License: MIT datatables.net/license/mit
|
|
@@ -11,33 +11,33 @@ $jscomp.polyfill=function(d,f,l,m){f&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfil
|
|
|
11
11
|
$jscomp.polyfillIsolated=function(d,f,l,m){var g=d.split(".");d=1===g.length;m=g[0];m=!d&&m in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var q=0;q<g.length-1;q++){var a=g[q];if(!(a in m))return;m=m[a]}g=g[g.length-1];l=$jscomp.IS_SYMBOL_NATIVE&&"es6"===l?m[g]:null;f=f(l);null!=f&&(d?$jscomp.defineProperty($jscomp.polyfills,g,{configurable:!0,writable:!0,value:f}):f!==l&&($jscomp.propertyToPolyfillSymbol[g]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(g):$jscomp.POLYFILL_PREFIX+g,g=
|
|
12
12
|
$jscomp.propertyToPolyfillSymbol[g],$jscomp.defineProperty(m,g,{configurable:!0,writable:!0,value:f})))};$jscomp.polyfill("Array.prototype.find",function(d){return d?d:function(f,l){return $jscomp.findInternal(this,f,l).v}},"es6","es3");
|
|
13
13
|
(function(d){"function"===typeof define&&define.amd?define(["jquery"],function(f){return d(f,window,document)}):"object"===typeof exports?module.exports=function(f,l){f||(f=window);return d(l,f,f.document)}:d(jQuery,window,document)})(function(d,f,l,m){var g,q=function(a,b){"undefined"===typeof g&&(g=f.moment?f.moment:f.dayjs?f.dayjs:f.luxon?f.luxon:null);this.c=d.extend(!0,{},q.defaults,b);b=this.c.classPrefix;var c=this.c.i18n;if(!g&&"YYYY-MM-DD"!==this.c.format)throw"DateTime: Without momentjs, dayjs or luxon only the format 'YYYY-MM-DD' can be used";
|
|
14
|
-
"string"===typeof this.c.minDate&&(this.c.minDate=new Date(this.c.minDate));"string"===typeof this.c.maxDate&&(this.c.maxDate=new Date(this.c.maxDate));c=d('<div class="'+b+'"><div class="'+b+'-date"><div class="'+b+'-title"><div class="'+b+'-iconLeft"><button title="'+c.previous+'">'+c.previous+'</button></div><div class="'+b+'-iconRight"><button title="'+c.next+'">'+c.next+'</button></div><div class="'+b+'-label"><span></span><select class="'+b+'-month"></select></div><div class="'+
|
|
15
|
-
b+'-year"></select></div></div><div class="'+b+'-buttons"><a class="'+b+'-clear">'+c.clear+'</a><a class="'+b+'-today">'+c.today+'</a></div><div class="'+b+'-calendar"></div></div><div class="'+b+'-time"><div class="'+b+'-hours"></div><div class="'+b+'-minutes"></div><div class="'+b+'-seconds"></div></div><div class="'+b+'-error"></div></div>');this.dom={container:c,date:c.find("."+b+"-date"),title:c.find("."+b+"-title"),calendar:c.find("."+b+"-calendar"),
|
|
16
|
-
b+"-error"),buttons:c.find("."+b+"-buttons"),clear:c.find("."+b+"-clear"),today:c.find("."+b+"-today"),input:d(a)};this.s={d:null,display:null,minutesRange:null,secondsRange:null,namespace:"dateime-"+q._instance++,parts:{date:null!==this.c.format.match(/[YMD]|L(?!T)|l/),time:null!==this.c.format.match(/[Hhm]|LT|LTS/),seconds:-1!==this.c.format.indexOf("s"),hours12:null!==this.c.format.match(/[haA]/)}};this.dom.container.append(this.dom.date).append(this.dom.time).append(this.dom.error);
|
|
17
|
-
this._constructor()};d.extend(q.prototype,{destroy:function(){this._hide(!0);this.dom.container.off().empty();this.dom.input.removeAttr("autocomplete").off(".datetime")},errorMsg:function(a){var b=this.dom.error;a?b.html(a):b.empty();return this},hide:function(){this._hide();return this},max:function(a){this.c.maxDate="string"===typeof a?new Date(a):a;this._optionsTitle();this._setCalander();return this},min:function(a){this.c.minDate=
|
|
18
|
-
return this},owns:function(a){return 0<d(a).parents().filter(this.dom.container).length},val:function(a,b){if(a===m)return this.s.d;if(a instanceof Date)this.s.d=this._dateToUtc(a);else if(null===a||""===a)this.s.d=null;else if("--now"===a)this.s.d=new Date;else if("string"===typeof a)if(g&&g==f.luxon){var c=g.DateTime.fromFormat(a,this.c.format);this.s.d=c.isValid?c.toJSDate():null}else g?(c=g.utc(a,this.c.format,this.c.locale,
|
|
19
|
-
this.s.d=c?new Date(Date.UTC(c[1],c[2]-1,c[3])):null);if(b||b===m)this.s.d?this._writeOutput():this.dom.input.val(a);this.s.display=this.s.d?new Date(this.s.d.toString()):new Date;this.s.display.setUTCDate(1);this._setTitle();this._setCalander();this._setTime();return this},_constructor:function(){var a=this,b=this.c.classPrefix,c=this.dom.input.val(),k=function(){var e=a.dom.input.val();e!==c&&(a.c.onChange.call(a,
|
|
20
|
-
this.s.parts.time||this.dom.time.css("display","none");this.s.parts.seconds||(this.dom.time.children("div."+b+"-seconds").remove(),this.dom.time.children("span").eq(1).remove());this.c.buttons.clear||this.dom.clear.css("display","none");this.c.buttons.today||this.dom.today.css("display","none");this._optionsTitle();d(l).on("i18n.dt",function(e,h){h.oLanguage.datetime&&(d.extend(!0,a.c.i18n,h.oLanguage.datetime),a._optionsTitle())});
|
|
21
|
-
this.c.attachTo="input",this.val(this.dom.input.val(),!1),this._show());c&&this.val(c,!1);this.dom.input.attr("autocomplete","off").on("focus.datetime click.datetime",function(){a.dom.container.is(":visible")||a.dom.input.is(":disabled")||(a.val(a.dom.input.val(),!1),a._show())}).on("keyup.datetime",function(){a.dom.container.is(":visible")&&a.val(a.dom.input.val(),!1)});this.dom.container.on("change","select",function(){var e=
|
|
22
|
-
h),a._setTitle(),a._setCalander()):e.hasClass(b+"-year")?(a.s.display.setUTCFullYear(h),a._setTitle(),a._setCalander()):e.hasClass(b+"-hours")||e.hasClass(b+"-ampm")?(a.s.parts.hours12?(e=1*d(a.dom.container).find("."+b+"-hours").val(),h="pm"===d(a.dom.container).find("."+b+"-ampm").val(),a.s.d.setUTCHours(12!==e||h?h&&12!==e?e+12:e:0)):a.s.d.setUTCHours(h),a._setTime(),a._writeOutput(!0),k()):e.hasClass(b+"-minutes")?(a.s.d.setUTCMinutes(h),
|
|
23
|
-
(a.s.d.setSeconds(h),a._setTime(),a._writeOutput(!0),k());a.dom.input.focus();a._position()}).on("click",function(e){var h=a.s.d;h=e.target.nodeName.toLowerCase();var r="span"===h?e.target.parentNode:e.target;h=r.nodeName.toLowerCase();if("select"!==h)if(e.stopPropagation(),"a"===h&&(e.preventDefault(),d(r).hasClass(b+"-clear")?(a.s.d=null,a.dom.input.val(""),a._writeOutput(),a._setCalander(),a._setTime(),k()):d(r).hasClass(b+"-today")&&
|
|
24
|
-
h){var p=d(r);e=p.parent();if(e.hasClass("disabled")&&!e.hasClass("range"))p.blur();else if(e.hasClass(b+"-iconLeft"))a.s.display.setUTCMonth(a.s.display.getUTCMonth()-1),a._setTitle(),a._setCalander(),a.dom.input.focus();else if(e.hasClass(b+"-iconRight"))a._correctMonth(a.s.display,a.s.display.getUTCMonth()+1),a._setTitle(),a._setCalander(),a.dom.input.focus();else{if(p.parents("."+b+"-time").length){r=p.data("value");p=p.data("unit");
|
|
25
|
-
e.hasClass("range")){a.s.minutesRange=r;a._setTime();return}a.s.minutesRange=null}if("seconds"===p){if(e.hasClass("disabled")&&e.hasClass("range")){a.s.secondsRange=r;a._setTime();return}a.s.secondsRange=null}if("am"===r)if(12<=h.getUTCHours())r=h.getUTCHours()-12;else return;else if("pm"===r)if(12>h.getUTCHours())r=h.getUTCHours()+12;else return;h["hours"===p?"setUTCHours":"minutes"===p?"setUTCMinutes":"setSeconds"](r);a._setTime();a._writeOutput(!0)}else h=
|
|
26
|
-
h.setUTCMonth(p.data("month")),h.setUTCDate(p.data("day")),a._writeOutput(!0),a.s.parts.time?a._setCalander():setTimeout(function(){a._hide()},10);k()}}else a.dom.input.focus()})},_compareDates:function(a,b){return g&&g==f.luxon?g.DateTime.fromJSDate(a).toISODate()===g.DateTime.fromJSDate(b).toISODate():this._dateToUtcString(a)===this._dateToUtcString(b)},_correctMonth:function(a,b){var c=this._daysInMonth(a.getUTCFullYear(),b),k=a.getUTCDate()>
|
|
27
|
-
_daysInMonth:function(a,b){return[31,0!==a%4||0===a%100&&0!==a%400?28:29,31,30,31,30,31,31,30,31,30,31][b]},_dateToUtc:function(a){return new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds()))},_dateToUtcString:function(a){return g&&g==f.luxon?g.DateTime.fromJSDate(a).toISODate():a.getUTCFullYear()+"-"+this._pad(a.getUTCMonth()+1)+"-"+this._pad(a.getUTCDate())},_hide:function(a){if(a||"hidden"!==
|
|
28
|
-
d(f).off("."+a),d(l).off("keydown."+a),d("div.dataTables_scrollBody").off("scroll."+a),d("div.DTE_Body_Content").off("scroll."+a),d("body").off("click."+a)},_hours24To12:function(a){return 0===a?12:12<a?a-12:a},_htmlDay:function(a){if(a.empty)return'<td class="empty"></td>';var b=["selectable"],c=this.c.classPrefix;a.disabled&&b.push("disabled");a.today&&b.push("now");a.selected&&
|
|
29
|
-
a.year+'" data-month="'+a.month+'" data-day="'+a.day+'"><span>'+a.day+"</span></button></td>"},_htmlMonth:function(a,b){var c=this._dateToUtc(new Date),k=this._daysInMonth(a,b),e=(new Date(Date.UTC(a,b,1))).getUTCDay(),h=[],r=[];0<this.c.firstDay&&(e-=this.c.firstDay,0>e&&(e+=7));for(var p=k+e,u=p;7<u;)u-=7;p+=7-u;var w=this.c.minDate;u=this.c.maxDate;w&&(w.setUTCHours(0),
|
|
30
|
-
new Date(Date.UTC(a,b,1+(n-e))),A=this.s.d?this._compareDates(x,this.s.d):!1,v=this._compareDates(x,c),B=n<e||n>=k+e,z=w&&x<w||u&&x>u,y=this.c.disableDays;Array.isArray(y)&&-1!==d.inArray(x.getUTCDay(),y)?z=!0:"function"===typeof y&&!0===y(x)&&(z=!0);r.push(this._htmlDay({day:1+(n-e),month:b,year:a,selected:A,today:v,disabled:z,empty:B}));7===++t&&(this.c.showWeekNumber&&
|
|
31
|
-
(k+=" weekNumber");w&&(w=w>=new Date(Date.UTC(a,b,1,0,0,0)),this.dom.title.find("div."+c+"-iconLeft").css("display",w?"none":"block"));u&&(a=u<new Date(Date.UTC(a,b+1,1,0,0,0)),this.dom.title.find("div."+c+"-iconRight").css("display",a?"none":"block"));return'<table class="'+k+'"><thead>'+this._htmlMonthHead()+"</thead><tbody>"+h.join("")+"</tbody></table>"},
|
|
32
|
-
a.push("<th></th>");for(var e=0;7>e;e++)a.push("<th>"+k(e)+"</th>");return a.join("")},_htmlWeekOfYear:function(a,b,c){a=new Date(c,b,a,0,0,0,0);a.setDate(a.getDate()+4-(a.getDay()||7));return'<td class="'+this.c.classPrefix+'-week">'+Math.ceil(((a-new Date(c,0,1))/864E5+1)/7)+"</td>"},_needValue:function(){this.s.d||(this.s.d=this._dateToUtc(new Date));
|
|
33
|
-
e;k++)a.append('<option value="'+b[k]+'">'+c[k]+"</option>")},_optionSet:function(a,b){var c=this.dom.container.find("select."+this.c.classPrefix+"-"+a);a=c.parent().children("span");c.val(b);b=c.find("option:selected");a.html(0!==b.length?b.text():this.c.i18n.unknown)},_optionsTime:function(a,b,c,k,e){var h=this.c.classPrefix,r=this.dom.container.find("div."+
|
|
34
|
-
function(v,B,z){12===b&&"number"===typeof v&&(12<=c&&(v+=12),12==v?v=0:24==v&&(v=12));var y=c===v||"am"===v&&12>c||"pm"===v&&12<=c?"selected":"";k&&-1===d.inArray(v,k)&&(y+=" disabled");z&&(y+=" "+z);return'<td class="selectable '+y+'"><button class="'+h+"-button "+h+'-day" type="button" data-unit="'+a+'" data-value="'+v+'"><span>'+B+"</span></button></td>"};if(12===
|
|
35
|
-
"</tr>";t=7}else{if(24===b){var A=0;for(t=0;4>t;t++){n+="<tr>";for(e=0;6>e;e++)n+=x(A,p(A)),A++;n+="</tr>"}}else{n+="<tr>";for(t=0;60>t;t+=10)n+=x(t,p(t),"range");e=null!==e?e:10*Math.floor(c/10);n=n+'</tr></tbody></thead><table class="'+(u+" "+u+'-nospace"><tbody><tr>');for(t=e+1;t<e+10;t++)n+=x(t,p(t));n+="</tr>"}t=6}r.empty().append('<table class="'+u+'"><thead><tr><th colspan="'+
|
|
36
|
-
c=this.c.maxDate;b=b?b.getFullYear():null;c=c?c.getFullYear():null;b=null!==b?b:(new Date).getFullYear()-this.c.yearRange;c=null!==c?c:(new Date).getFullYear()+this.c.yearRange;this._options("month",this._range(0,11),a.months);this._options("year",this._range(b,c))},_pad:function(a){return 10>a?"0"+a:a},_position:function(){var a="input"===this.c.attachTo?this.dom.input.position():
|
|
37
|
-
else{this.s.parts.date&&this.s.parts.time&&550<d(f).width()?b.addClass("horizontal"):b.removeClass("horizontal");"input"===this.c.attachTo?b.css({top:a.top+c,left:a.left}).insertAfter(this.dom.input):b.css({top:a.top+c,left:a.left}).appendTo("body");var k=b.outerHeight(),e=b.outerWidth(),h=d(f).scrollTop();a.top+c+k-h>d(f).height()&&(c=a.top-k,b.css("top",0>c?0:c));e+a.left>
|
|
38
|
-
b,c){var k=[];for(c||(c=1);a<=b;a+=c)k.push(a);return k},_setCalander:function(){this.s.display&&this.dom.calendar.empty().append(this._htmlMonth(this.s.display.getUTCFullYear(),this.s.display.getUTCMonth()))},_setTitle:function(){this._optionSet("month",this.s.display.getUTCMonth());this._optionSet("year",this.s.display.getUTCFullYear())},_setTime:function(){var a=
|
|
39
|
-
"Available"]?a.c[h+"Available"]:a._range(0,59,a.c[h+"Increment"])};this._optionsTime("hours",this.s.parts.hours12?12:24,k,this.c.hoursAvailable);this._optionsTime("minutes",60,null!=c?c.minute:b?b.getUTCMinutes():0,e("minutes"),this.s.minutesRange);this._optionsTime("seconds",60,null!=c?c.second:b?b.getSeconds():0,e("seconds"),this.s.secondsRange)},_show:function(){var a=
|
|
40
|
-
b,function(){a._position()});d("div.dataTables_scrollBody").on("scroll."+b,function(){a._position()});var c=this.dom.input[0].offsetParent;if(c!==l.body)d(c).on("scroll."+b,function(){a._position()});d(l).on("keydown."+b,function(k){9!==k.keyCode&&27!==k.keyCode&&13!==k.keyCode||a._hide()});setTimeout(function(){d("body").on("click."+b,function(k){d(k.target).parents().filter(a.dom.container).length||
|
|
41
|
-
g==f.luxon?g.DateTime.fromJSDate(this.s.d).toFormat(this.c.format):g?g.utc(b,m,this.c.locale,this.c.strict).format(this.c.format):b.getUTCFullYear()+"-"+this._pad(b.getUTCMonth()+1)+"-"+this._pad(b.getUTCDate()));this.dom.input.val(c).trigger("change",{write:b});"hidden"===this.dom.input.attr("type")&&this.val(c,!1);a&&this.dom.input.focus()}});q.use=function(a){g=a};q._instance=0;q.defaults={attachTo:"body",
|
|
42
|
-
hoursAvailable:null,i18n:{clear:"Clear",previous:"Previous",next:"Next",months:"January February March April May June July August September October November December".split(" "),weekdays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),amPm:["am","pm"],hours:"Hour",minutes:"Minute",seconds:"Second",unknown:"-",today:"Today"},maxDate:null,minDate:null,minutesAvailable:null,minutesIncrement:1,strict:!0,locale:"en",
|
|
43
|
-
q.version="1.1.
|
|
14
|
+
"string"===typeof this.c.minDate&&(this.c.minDate=new Date(this.c.minDate));"string"===typeof this.c.maxDate&&(this.c.maxDate=new Date(this.c.maxDate));c=d('<div class="'+b+'"><div class="'+b+'-date"><div class="'+b+'-title"><div class="'+b+'-iconLeft"><button type="button" title="'+c.previous+'">'+c.previous+'</button></div><div class="'+b+'-iconRight"><button type="button" title="'+c.next+'">'+c.next+'</button></div><div class="'+b+'-label"><span></span><select class="'+b+'-month"></select></div><div class="'+
|
|
15
|
+
b+'-label"><span></span><select class="'+b+'-year"></select></div></div><div class="'+b+'-buttons"><a class="'+b+'-clear">'+c.clear+'</a><a class="'+b+'-today">'+c.today+'</a></div><div class="'+b+'-calendar"></div></div><div class="'+b+'-time"><div class="'+b+'-hours"></div><div class="'+b+'-minutes"></div><div class="'+b+'-seconds"></div></div><div class="'+b+'-error"></div></div>');this.dom={container:c,date:c.find("."+b+"-date"),title:c.find("."+b+"-title"),calendar:c.find("."+b+"-calendar"),
|
|
16
|
+
time:c.find("."+b+"-time"),error:c.find("."+b+"-error"),buttons:c.find("."+b+"-buttons"),clear:c.find("."+b+"-clear"),today:c.find("."+b+"-today"),input:d(a)};this.s={d:null,display:null,minutesRange:null,secondsRange:null,namespace:"dateime-"+q._instance++,parts:{date:null!==this.c.format.match(/[YMD]|L(?!T)|l/),time:null!==this.c.format.match(/[Hhm]|LT|LTS/),seconds:-1!==this.c.format.indexOf("s"),hours12:null!==this.c.format.match(/[haA]/)}};this.dom.container.append(this.dom.date).append(this.dom.time).append(this.dom.error);
|
|
17
|
+
this.dom.date.append(this.dom.title).append(this.dom.buttons).append(this.dom.calendar);this._constructor()};d.extend(q.prototype,{destroy:function(){this._hide(!0);this.dom.container.off().empty();this.dom.input.removeAttr("autocomplete").off(".datetime")},errorMsg:function(a){var b=this.dom.error;a?b.html(a):b.empty();return this},hide:function(){this._hide();return this},max:function(a){this.c.maxDate="string"===typeof a?new Date(a):a;this._optionsTitle();this._setCalander();return this},min:function(a){this.c.minDate=
|
|
18
|
+
"string"===typeof a?new Date(a):a;this._optionsTitle();this._setCalander();return this},owns:function(a){return 0<d(a).parents().filter(this.dom.container).length},val:function(a,b){if(a===m)return this.s.d;if(a instanceof Date)this.s.d=this._dateToUtc(a);else if(null===a||""===a)this.s.d=null;else if("--now"===a)this.s.d=new Date;else if("string"===typeof a)if(g&&g==f.luxon){var c=g.DateTime.fromFormat(a,this.c.format);this.s.d=c.isValid?c.toJSDate():null}else g?(c=g.utc(a,this.c.format,this.c.locale,
|
|
19
|
+
this.c.strict),this.s.d=c.isValid()?c.toDate():null):(c=a.match(/(\d{4})\-(\d{2})\-(\d{2})/),this.s.d=c?new Date(Date.UTC(c[1],c[2]-1,c[3])):null);if(b||b===m)this.s.d?this._writeOutput():this.dom.input.val(a);this.s.display=this.s.d?new Date(this.s.d.toString()):new Date;this.s.display.setUTCDate(1);this._setTitle();this._setCalander();this._setTime();return this},_constructor:function(){var a=this,b=this.c.classPrefix,c=this.dom.input.val(),k=function(){var e=a.dom.input.val();e!==c&&(a.c.onChange.call(a,
|
|
20
|
+
e,a.s.d,a.dom.input),c=e)};this.s.parts.date||this.dom.date.css("display","none");this.s.parts.time||this.dom.time.css("display","none");this.s.parts.seconds||(this.dom.time.children("div."+b+"-seconds").remove(),this.dom.time.children("span").eq(1).remove());this.c.buttons.clear||this.dom.clear.css("display","none");this.c.buttons.today||this.dom.today.css("display","none");this._optionsTitle();d(l).on("i18n.dt",function(e,h){h.oLanguage.datetime&&(d.extend(!0,a.c.i18n,h.oLanguage.datetime),a._optionsTitle())});
|
|
21
|
+
"hidden"===this.dom.input.attr("type")&&(this.dom.container.addClass("inline"),this.c.attachTo="input",this.val(this.dom.input.val(),!1),this._show());c&&this.val(c,!1);this.dom.input.attr("autocomplete","off").on("focus.datetime click.datetime",function(){a.dom.container.is(":visible")||a.dom.input.is(":disabled")||(a.val(a.dom.input.val(),!1),a._show())}).on("keyup.datetime",function(){a.dom.container.is(":visible")&&a.val(a.dom.input.val(),!1)});this.dom.container.on("change","select",function(){var e=
|
|
22
|
+
d(this),h=e.val();e.hasClass(b+"-month")?(a._correctMonth(a.s.display,h),a._setTitle(),a._setCalander()):e.hasClass(b+"-year")?(a.s.display.setUTCFullYear(h),a._setTitle(),a._setCalander()):e.hasClass(b+"-hours")||e.hasClass(b+"-ampm")?(a.s.parts.hours12?(e=1*d(a.dom.container).find("."+b+"-hours").val(),h="pm"===d(a.dom.container).find("."+b+"-ampm").val(),a.s.d.setUTCHours(12!==e||h?h&&12!==e?e+12:e:0)):a.s.d.setUTCHours(h),a._setTime(),a._writeOutput(!0),k()):e.hasClass(b+"-minutes")?(a.s.d.setUTCMinutes(h),
|
|
23
|
+
a._setTime(),a._writeOutput(!0),k()):e.hasClass(b+"-seconds")&&(a.s.d.setSeconds(h),a._setTime(),a._writeOutput(!0),k());a.dom.input.focus();a._position()}).on("click",function(e){var h=a.s.d;h=e.target.nodeName.toLowerCase();var r="span"===h?e.target.parentNode:e.target;h=r.nodeName.toLowerCase();if("select"!==h)if(e.stopPropagation(),"a"===h&&(e.preventDefault(),d(r).hasClass(b+"-clear")?(a.s.d=null,a.dom.input.val(""),a._writeOutput(),a._setCalander(),a._setTime(),k()):d(r).hasClass(b+"-today")&&
|
|
24
|
+
(a.s.display=new Date,a._setTitle(),a._setCalander())),"button"===h){var p=d(r);e=p.parent();if(e.hasClass("disabled")&&!e.hasClass("range"))p.blur();else if(e.hasClass(b+"-iconLeft"))a.s.display.setUTCMonth(a.s.display.getUTCMonth()-1),a._setTitle(),a._setCalander(),a.dom.input.focus();else if(e.hasClass(b+"-iconRight"))a._correctMonth(a.s.display,a.s.display.getUTCMonth()+1),a._setTitle(),a._setCalander(),a.dom.input.focus();else{if(p.parents("."+b+"-time").length){r=p.data("value");p=p.data("unit");
|
|
25
|
+
h=a._needValue();if("minutes"===p){if(e.hasClass("disabled")&&e.hasClass("range")){a.s.minutesRange=r;a._setTime();return}a.s.minutesRange=null}if("seconds"===p){if(e.hasClass("disabled")&&e.hasClass("range")){a.s.secondsRange=r;a._setTime();return}a.s.secondsRange=null}if("am"===r)if(12<=h.getUTCHours())r=h.getUTCHours()-12;else return;else if("pm"===r)if(12>h.getUTCHours())r=h.getUTCHours()+12;else return;h["hours"===p?"setUTCHours":"minutes"===p?"setUTCMinutes":"setSeconds"](r);a._setTime();a._writeOutput(!0)}else h=
|
|
26
|
+
a._needValue(),h.setUTCDate(1),h.setUTCFullYear(p.data("year")),h.setUTCMonth(p.data("month")),h.setUTCDate(p.data("day")),a._writeOutput(!0),a.s.parts.time?a._setCalander():setTimeout(function(){a._hide()},10);k()}}else a.dom.input.focus()})},_compareDates:function(a,b){return g&&g==f.luxon?g.DateTime.fromJSDate(a).toISODate()===g.DateTime.fromJSDate(b).toISODate():this._dateToUtcString(a)===this._dateToUtcString(b)},_correctMonth:function(a,b){var c=this._daysInMonth(a.getUTCFullYear(),b),k=a.getUTCDate()>
|
|
27
|
+
c;a.setUTCMonth(b);k&&(a.setUTCDate(c),a.setUTCMonth(b))},_daysInMonth:function(a,b){return[31,0!==a%4||0===a%100&&0!==a%400?28:29,31,30,31,30,31,31,30,31,30,31][b]},_dateToUtc:function(a){return new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds()))},_dateToUtcString:function(a){return g&&g==f.luxon?g.DateTime.fromJSDate(a).toISODate():a.getUTCFullYear()+"-"+this._pad(a.getUTCMonth()+1)+"-"+this._pad(a.getUTCDate())},_hide:function(a){if(a||"hidden"!==
|
|
28
|
+
this.dom.input.attr("type"))a=this.s.namespace,this.dom.container.detach(),d(f).off("."+a),d(l).off("keydown."+a),d("div.dataTables_scrollBody").off("scroll."+a),d("div.DTE_Body_Content").off("scroll."+a),d("body").off("click."+a),d(this.dom.input[0].offsetParent).off("."+a)},_hours24To12:function(a){return 0===a?12:12<a?a-12:a},_htmlDay:function(a){if(a.empty)return'<td class="empty"></td>';var b=["selectable"],c=this.c.classPrefix;a.disabled&&b.push("disabled");a.today&&b.push("now");a.selected&&
|
|
29
|
+
b.push("selected");return'<td data-day="'+a.day+'" class="'+b.join(" ")+'"><button class="'+c+"-button "+c+'-day" type="button" data-year="'+a.year+'" data-month="'+a.month+'" data-day="'+a.day+'"><span>'+a.day+"</span></button></td>"},_htmlMonth:function(a,b){var c=this._dateToUtc(new Date),k=this._daysInMonth(a,b),e=(new Date(Date.UTC(a,b,1))).getUTCDay(),h=[],r=[];0<this.c.firstDay&&(e-=this.c.firstDay,0>e&&(e+=7));for(var p=k+e,u=p;7<u;)u-=7;p+=7-u;var w=this.c.minDate;u=this.c.maxDate;w&&(w.setUTCHours(0),
|
|
30
|
+
w.setUTCMinutes(0),w.setSeconds(0));u&&(u.setUTCHours(23),u.setUTCMinutes(59),u.setSeconds(59));for(var n=0,t=0;n<p;n++){var x=new Date(Date.UTC(a,b,1+(n-e))),A=this.s.d?this._compareDates(x,this.s.d):!1,v=this._compareDates(x,c),B=n<e||n>=k+e,z=w&&x<w||u&&x>u,y=this.c.disableDays;Array.isArray(y)&&-1!==d.inArray(x.getUTCDay(),y)?z=!0:"function"===typeof y&&!0===y(x)&&(z=!0);r.push(this._htmlDay({day:1+(n-e),month:b,year:a,selected:A,today:v,disabled:z,empty:B}));7===++t&&(this.c.showWeekNumber&&
|
|
31
|
+
r.unshift(this._htmlWeekOfYear(n-e,b,a)),h.push("<tr>"+r.join("")+"</tr>"),r=[],t=0)}c=this.c.classPrefix;k=c+"-table";this.c.showWeekNumber&&(k+=" weekNumber");w&&(w=w>=new Date(Date.UTC(a,b,1,0,0,0)),this.dom.title.find("div."+c+"-iconLeft").css("display",w?"none":"block"));u&&(a=u<new Date(Date.UTC(a,b+1,1,0,0,0)),this.dom.title.find("div."+c+"-iconRight").css("display",a?"none":"block"));return'<table class="'+k+'"><thead>'+this._htmlMonthHead()+"</thead><tbody>"+h.join("")+"</tbody></table>"},
|
|
32
|
+
_htmlMonthHead:function(){var a=[],b=this.c.firstDay,c=this.c.i18n,k=function(h){for(h+=b;7<=h;)h-=7;return c.weekdays[h]};this.c.showWeekNumber&&a.push("<th></th>");for(var e=0;7>e;e++)a.push("<th>"+k(e)+"</th>");return a.join("")},_htmlWeekOfYear:function(a,b,c){a=new Date(c,b,a,0,0,0,0);a.setDate(a.getDate()+4-(a.getDay()||7));return'<td class="'+this.c.classPrefix+'-week">'+Math.ceil(((a-new Date(c,0,1))/864E5+1)/7)+"</td>"},_needValue:function(){this.s.d||(this.s.d=this._dateToUtc(new Date));
|
|
33
|
+
return this.s.d},_options:function(a,b,c){c||(c=b);a=this.dom.container.find("select."+this.c.classPrefix+"-"+a);a.empty();for(var k=0,e=b.length;k<e;k++)a.append('<option value="'+b[k]+'">'+c[k]+"</option>")},_optionSet:function(a,b){var c=this.dom.container.find("select."+this.c.classPrefix+"-"+a);a=c.parent().children("span");c.val(b);b=c.find("option:selected");a.html(0!==b.length?b.text():this.c.i18n.unknown)},_optionsTime:function(a,b,c,k,e){var h=this.c.classPrefix,r=this.dom.container.find("div."+
|
|
34
|
+
h+"-"+a),p=12===b?function(v){return v}:this._pad;h=this.c.classPrefix;var u=h+"-table",w=this.c.i18n;if(r.length){var n="";var t=10;var x=function(v,B,z){12===b&&"number"===typeof v&&(12<=c&&(v+=12),12==v?v=0:24==v&&(v=12));var y=c===v||"am"===v&&12>c||"pm"===v&&12<=c?"selected":"";k&&-1===d.inArray(v,k)&&(y+=" disabled");z&&(y+=" "+z);return'<td class="selectable '+y+'"><button class="'+h+"-button "+h+'-day" type="button" data-unit="'+a+'" data-value="'+v+'"><span>'+B+"</span></button></td>"};if(12===
|
|
35
|
+
b){n+="<tr>";for(e=1;6>=e;e++)n+=x(e,p(e));n+=x("am",w.amPm[0]);n+="</tr><tr>";for(e=7;12>=e;e++)n+=x(e,p(e));n+=x("pm",w.amPm[1]);n+="</tr>";t=7}else{if(24===b){var A=0;for(t=0;4>t;t++){n+="<tr>";for(e=0;6>e;e++)n+=x(A,p(A)),A++;n+="</tr>"}}else{n+="<tr>";for(t=0;60>t;t+=10)n+=x(t,p(t),"range");e=null!==e?e:10*Math.floor(c/10);n=n+'</tr></tbody></thead><table class="'+(u+" "+u+'-nospace"><tbody><tr>');for(t=e+1;t<e+10;t++)n+=x(t,p(t));n+="</tr>"}t=6}r.empty().append('<table class="'+u+'"><thead><tr><th colspan="'+
|
|
36
|
+
t+'">'+w[a]+"</th></tr></thead><tbody>"+n+"</tbody></table>")}},_optionsTitle:function(){var a=this.c.i18n,b=this.c.minDate,c=this.c.maxDate;b=b?b.getFullYear():null;c=c?c.getFullYear():null;b=null!==b?b:(new Date).getFullYear()-this.c.yearRange;c=null!==c?c:(new Date).getFullYear()+this.c.yearRange;this._options("month",this._range(0,11),a.months);this._options("year",this._range(b,c))},_pad:function(a){return 10>a?"0"+a:a},_position:function(){var a="input"===this.c.attachTo?this.dom.input.position():
|
|
37
|
+
this.dom.input.offset(),b=this.dom.container,c=this.dom.input.outerHeight();if(b.hasClass("inline"))b.insertAfter(this.dom.input);else{this.s.parts.date&&this.s.parts.time&&550<d(f).width()?b.addClass("horizontal"):b.removeClass("horizontal");"input"===this.c.attachTo?b.css({top:a.top+c,left:a.left}).insertAfter(this.dom.input):b.css({top:a.top+c,left:a.left}).appendTo("body");var k=b.outerHeight(),e=b.outerWidth(),h=d(f).scrollTop();a.top+c+k-h>d(f).height()&&(c=a.top-k,b.css("top",0>c?0:c));e+a.left>
|
|
38
|
+
d(f).width()&&(a=d(f).width()-e,"input"===this.c.attachTo&&(a-=d(b).offsetParent().offset().left),b.css("left",0>a?0:a))}},_range:function(a,b,c){var k=[];for(c||(c=1);a<=b;a+=c)k.push(a);return k},_setCalander:function(){this.s.display&&this.dom.calendar.empty().append(this._htmlMonth(this.s.display.getUTCFullYear(),this.s.display.getUTCMonth()))},_setTitle:function(){this._optionSet("month",this.s.display.getUTCMonth());this._optionSet("year",this.s.display.getUTCFullYear())},_setTime:function(){var a=
|
|
39
|
+
this,b=this.s.d,c=null;g&&g==f.luxon&&(c=g.DateTime.fromJSDate(b));var k=null!=c?c.hour:b?b.getUTCHours():0,e=function(h){return a.c[h+"Available"]?a.c[h+"Available"]:a._range(0,59,a.c[h+"Increment"])};this._optionsTime("hours",this.s.parts.hours12?12:24,k,this.c.hoursAvailable);this._optionsTime("minutes",60,null!=c?c.minute:b?b.getUTCMinutes():0,e("minutes"),this.s.minutesRange);this._optionsTime("seconds",60,null!=c?c.second:b?b.getSeconds():0,e("seconds"),this.s.secondsRange)},_show:function(){var a=
|
|
40
|
+
this,b=this.s.namespace;this._position();d(f).on("scroll."+b+" resize."+b,function(){a._position()});d("div.DTE_Body_Content").on("scroll."+b,function(){a._position()});d("div.dataTables_scrollBody").on("scroll."+b,function(){a._position()});var c=this.dom.input[0].offsetParent;if(c!==l.body)d(c).on("scroll."+b,function(){a._position()});d(l).on("keydown."+b,function(k){9!==k.keyCode&&27!==k.keyCode&&13!==k.keyCode||a._hide()});setTimeout(function(){d("body").on("click."+b,function(k){d(k.target).parents().filter(a.dom.container).length||
|
|
41
|
+
k.target===a.dom.input[0]||a._hide()})},10)},_writeOutput:function(a){var b=this.s.d,c="";b&&(c=g&&g==f.luxon?g.DateTime.fromJSDate(this.s.d).toFormat(this.c.format):g?g.utc(b,m,this.c.locale,this.c.strict).format(this.c.format):b.getUTCFullYear()+"-"+this._pad(b.getUTCMonth()+1)+"-"+this._pad(b.getUTCDate()));this.dom.input.val(c).trigger("change",{write:b});"hidden"===this.dom.input.attr("type")&&this.val(c,!1);a&&this.dom.input.focus()}});q.use=function(a){g=a};q._instance=0;q.defaults={attachTo:"body",
|
|
42
|
+
buttons:{clear:!1,today:!1},classPrefix:"dt-datetime",disableDays:null,firstDay:1,format:"YYYY-MM-DD",hoursAvailable:null,i18n:{clear:"Clear",previous:"Previous",next:"Next",months:"January February March April May June July August September October November December".split(" "),weekdays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),amPm:["am","pm"],hours:"Hour",minutes:"Minute",seconds:"Second",unknown:"-",today:"Today"},maxDate:null,minDate:null,minutesAvailable:null,minutesIncrement:1,strict:!0,locale:"en",
|
|
43
|
+
onChange:function(){},secondsAvailable:null,secondsIncrement:1,showWeekNumber:!1,yearRange:25};q.version="1.1.2";f.DateTime||(f.DateTime=q);d.fn.dtDateTime=function(a){return this.each(function(){new q(this,a)})};d.fn.dataTable&&(d.fn.dataTable.DateTime=q,d.fn.DataTable.DateTime=q,d.fn.dataTable.Editor&&(d.fn.dataTable.Editor.DateTime=q));return q});
|
package/gulpfile.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! DateTime picker for DataTables.net v1.1.
|
|
1
|
+
/*! DateTime picker for DataTables.net v1.1.2
|
|
2
2
|
*
|
|
3
3
|
* © SpryMedia Ltd, all rights reserved.
|
|
4
4
|
* License: MIT datatables.net/license/mit
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @summary DateTime picker for DataTables.net
|
|
9
|
-
* @version 1.1.
|
|
9
|
+
* @version 1.1.2
|
|
10
10
|
* @file dataTables.dateTime.js
|
|
11
11
|
* @author SpryMedia Ltd
|
|
12
12
|
* @contact www.datatables.net/contact
|
|
@@ -102,10 +102,10 @@ var DateTime = function ( input, opts ) {
|
|
|
102
102
|
'<div class="'+classPrefix+'-date">'+
|
|
103
103
|
'<div class="'+classPrefix+'-title">'+
|
|
104
104
|
'<div class="'+classPrefix+'-iconLeft">'+
|
|
105
|
-
'<button title="'+i18n.previous+'">'+i18n.previous+'</button>'+
|
|
105
|
+
'<button type="button" title="'+i18n.previous+'">'+i18n.previous+'</button>'+
|
|
106
106
|
'</div>'+
|
|
107
107
|
'<div class="'+classPrefix+'-iconRight">'+
|
|
108
|
-
'<button title="'+i18n.next+'">'+i18n.next+'</button>'+
|
|
108
|
+
'<button type="button" title="'+i18n.next+'">'+i18n.next+'</button>'+
|
|
109
109
|
'</div>'+
|
|
110
110
|
'<div class="'+classPrefix+'-label">'+
|
|
111
111
|
'<span></span>'+
|
|
@@ -740,6 +740,7 @@ $.extend( DateTime.prototype, {
|
|
|
740
740
|
$('div.dataTables_scrollBody').off( 'scroll.'+namespace );
|
|
741
741
|
$('div.DTE_Body_Content').off( 'scroll.'+namespace );
|
|
742
742
|
$('body').off( 'click.'+namespace );
|
|
743
|
+
$(this.dom.input[0].offsetParent).off('.'+namespace);
|
|
743
744
|
},
|
|
744
745
|
|
|
745
746
|
/**
|
|
@@ -1534,7 +1535,7 @@ DateTime.defaults = {
|
|
|
1534
1535
|
yearRange: 25
|
|
1535
1536
|
};
|
|
1536
1537
|
|
|
1537
|
-
DateTime.version = '1.1.
|
|
1538
|
+
DateTime.version = '1.1.2';
|
|
1538
1539
|
|
|
1539
1540
|
// Global export - if no conflicts
|
|
1540
1541
|
if (! window.DateTime) {
|
package/make.sh
CHANGED
|
@@ -23,8 +23,8 @@ DT_SRC=$(dirname $(dirname $(pwd)))
|
|
|
23
23
|
DT_BUILT="${DT_SRC}/built/DataTables"
|
|
24
24
|
. $DT_SRC/build/include.sh
|
|
25
25
|
|
|
26
|
-
if [ ! -d node_modules ]; then
|
|
27
|
-
npm install
|
|
26
|
+
if [ ! -d node_modules -o ! -d node_modules/node-sass ]; then
|
|
27
|
+
npm install
|
|
28
28
|
fi
|
|
29
29
|
|
|
30
30
|
./node_modules/gulp/bin/gulp.js
|
package/nuget.nuspec
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
|
3
3
|
<metadata>
|
|
4
4
|
<id>datatables.net-datetime</id>
|
|
5
|
-
<version>1.1.
|
|
5
|
+
<version>1.1.2</version>
|
|
6
6
|
<description>DataTables date / time picker</description>
|
|
7
7
|
<authors>SpryMedia Ltd</authors>
|
|
8
8
|
<projectUrl>http://datatables.net</projectUrl>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "datatables.net-datetime",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "DateTime picker for DataTables.net",
|
|
5
5
|
"main": "dist/dataTables.dateTime.js",
|
|
6
6
|
"style": "dist/dataTables.dateTime.css",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"homepage": "https://github.com/DataTables/DateTime#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"gulp": "^4.0.2",
|
|
29
|
-
"gulp-sass": "^
|
|
29
|
+
"gulp-sass": "^5.0.0",
|
|
30
|
+
"sass": "^1.43.4"
|
|
30
31
|
}
|
|
31
32
|
}
|
|
Binary file
|