datatables.net-datetime 1.0.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.
Files changed (94) hide show
  1. package/css/{dateTime.scss → dataTables.dateTime.scss} +15 -0
  2. package/dist/dataTables.dateTime.css +218 -0
  3. package/{js/dateTime.js → dist/dataTables.dateTime.js} +191 -51
  4. package/dist/dataTables.dateTime.min.css +1 -0
  5. package/dist/dataTables.dateTime.min.js +43 -0
  6. package/docs/api/DateTime.use().xml +32 -0
  7. package/docs/api/destroy().xml +28 -0
  8. package/docs/api/errorMsg().xml +52 -0
  9. package/docs/api/hide().xml +36 -0
  10. package/docs/api/max().xml +35 -0
  11. package/docs/api/min().xml +35 -0
  12. package/docs/api/owns().xml +30 -0
  13. package/docs/api/val().xml +44 -0
  14. package/docs/option/buttons.clear.xml +27 -0
  15. package/docs/option/buttons.today.xml +29 -0
  16. package/docs/option/buttons.xml +28 -0
  17. package/docs/option/disableDays.xml +45 -0
  18. package/docs/option/firstDay.xml +34 -0
  19. package/docs/option/format.xml +31 -0
  20. package/docs/option/hoursAvailable.xml +36 -0
  21. package/docs/option/i18n.amPm.xml +32 -0
  22. package/docs/option/i18n.clear.xml +28 -0
  23. package/docs/option/i18n.hours.xml +33 -0
  24. package/docs/option/i18n.minutes.xml +33 -0
  25. package/docs/option/i18n.months.xml +32 -0
  26. package/docs/option/i18n.next.xml +32 -0
  27. package/docs/option/i18n.previous.xml +32 -0
  28. package/docs/option/i18n.seconds.xml +33 -0
  29. package/docs/option/i18n.today.xml +28 -0
  30. package/docs/option/i18n.unknown.xml +32 -0
  31. package/docs/option/i18n.weekdays.xml +32 -0
  32. package/docs/option/i18n.xml +37 -0
  33. package/docs/option/locale.xml +31 -0
  34. package/docs/option/maxDate.xml +51 -0
  35. package/docs/option/minDate.xml +52 -0
  36. package/docs/option/minutesAvailable.xml +36 -0
  37. package/docs/option/onChange.xml +38 -0
  38. package/docs/option/secondsAvailable.xml +36 -0
  39. package/docs/option/showWeekNumber.xml +30 -0
  40. package/docs/option/yearRange.xml +35 -0
  41. package/examples/index.xml +12 -0
  42. package/examples/initialisation/buttons.xml +38 -0
  43. package/examples/initialisation/datetime.xml +30 -0
  44. package/examples/initialisation/dayjs.xml +34 -0
  45. package/examples/initialisation/hidden.xml +28 -0
  46. package/examples/initialisation/i18n.xml +37 -0
  47. package/examples/initialisation/index.xml +12 -0
  48. package/examples/initialisation/jquery.xml +28 -0
  49. package/examples/initialisation/luxon.xml +29 -0
  50. package/examples/initialisation/moment.xml +29 -0
  51. package/examples/initialisation/simple.xml +30 -0
  52. package/examples/integration/datatables.xml +74 -0
  53. package/examples/integration/form.xml +65 -0
  54. package/gulpfile.js +3 -3
  55. package/js/{dateTime.d.ts → dataTables.dateTime.d.ts} +0 -1
  56. package/{dist/dateTime.js → js/dataTables.dateTime.js} +191 -51
  57. package/license.txt +9 -0
  58. package/make.sh +50 -0
  59. package/nuget.nuspec +20 -0
  60. package/package.json +6 -4
  61. package/readme.md +3 -1
  62. package/test/api/dateTime.destroy().js +49 -0
  63. package/test/api/dateTime.errorMsg().js +52 -0
  64. package/test/api/dateTime.hide().js +49 -0
  65. package/test/api/dateTime.max().js +86 -0
  66. package/test/api/dateTime.min().js +85 -0
  67. package/test/api/dateTime.owns().js +53 -0
  68. package/test/api/dateTime.val().js +70 -0
  69. package/test/options/dateTime.YearRange.js +51 -0
  70. package/test/options/dateTime.disableDays.js +46 -0
  71. package/test/options/dateTime.firstDay.js +33 -0
  72. package/test/options/dateTime.format.js +85 -0
  73. package/test/options/dateTime.i18n.amPm.js +35 -0
  74. package/test/options/dateTime.i18n.hours.js +33 -0
  75. package/test/options/dateTime.i18n.minutes.js +33 -0
  76. package/test/options/dateTime.i18n.months.js +33 -0
  77. package/test/options/dateTime.i18n.next.js +31 -0
  78. package/test/options/dateTime.i18n.previous.js +31 -0
  79. package/test/options/dateTime.i18n.seconds.js +33 -0
  80. package/test/options/dateTime.i18n.unknown.js +33 -0
  81. package/test/options/dateTime.i18n.weekdays.js +30 -0
  82. package/test/options/dateTime.init.js +54 -0
  83. package/test/options/dateTime.maxDate.js +66 -0
  84. package/test/options/dateTime.minDate.js +66 -0
  85. package/test/options/dateTime.onChange.js +130 -0
  86. package/test/options/dateTime.showWeekNumber.js +36 -0
  87. package/dist/dateTime.css +0 -168
  88. package/examples/basic.html +0 -26
  89. package/examples/datetime.html +0 -29
  90. package/examples/dayjs.html +0 -32
  91. package/examples/hidden.html +0 -26
  92. package/examples/jquery.html +0 -26
  93. package/examples/moment.html +0 -29
  94. package/examples/right.html +0 -39
package/dist/dateTime.css DELETED
@@ -1,168 +0,0 @@
1
- div.dt-datetime {
2
- position: absolute;
3
- background-color: white;
4
- z-index: 2050;
5
- border: 1px solid #ccc;
6
- box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.5);
7
- padding: 0 20px 6px 20px;
8
- width: 275px; }
9
- div.dt-datetime.inline {
10
- position: relative;
11
- box-shadow: none; }
12
- div.dt-datetime div.dt-datetime-title {
13
- text-align: center;
14
- padding: 5px 0px 3px; }
15
- div.dt-datetime table {
16
- border-spacing: 0;
17
- margin: 12px 0;
18
- width: 100%; }
19
- div.dt-datetime table.dt-datetime-table-nospace {
20
- margin-top: -12px; }
21
- div.dt-datetime table th {
22
- font-size: 0.8em;
23
- color: #777;
24
- font-weight: normal;
25
- width: 14.285714286%;
26
- padding: 0 0 4px 0;
27
- text-align: center; }
28
- div.dt-datetime table td {
29
- font-size: 0.9em;
30
- color: #444;
31
- padding: 0; }
32
- div.dt-datetime table td.selectable {
33
- text-align: center;
34
- background: #f5f5f5; }
35
- div.dt-datetime table td.selectable.disabled {
36
- color: #aaa;
37
- background: white; }
38
- div.dt-datetime table td.selectable.disabled button:hover {
39
- color: #aaa;
40
- background: white; }
41
- div.dt-datetime table td.selectable.now {
42
- background-color: #ddd; }
43
- div.dt-datetime table td.selectable.now button {
44
- font-weight: bold; }
45
- div.dt-datetime table td.selectable.selected button {
46
- background: #4E6CA3;
47
- color: white;
48
- border-radius: 2px; }
49
- div.dt-datetime table td.selectable button:hover {
50
- background: #ff8000;
51
- color: white;
52
- border-radius: 2px; }
53
- div.dt-datetime table td.dt-datetime-week {
54
- font-size: 0.7em; }
55
- div.dt-datetime table button {
56
- width: 100%;
57
- box-sizing: border-box;
58
- border: none;
59
- background: transparent;
60
- font-size: inherit;
61
- color: inherit;
62
- text-align: center;
63
- padding: 4px 0;
64
- cursor: pointer;
65
- margin: 0; }
66
- div.dt-datetime table button span {
67
- display: inline-block;
68
- min-width: 14px;
69
- text-align: right; }
70
- div.dt-datetime table.weekNumber th {
71
- width: 12.5%; }
72
- div.dt-datetime div.dt-datetime-calendar table {
73
- margin-top: 0; }
74
- div.dt-datetime div.dt-datetime-label {
75
- position: relative;
76
- display: inline-block;
77
- height: 30px;
78
- padding: 5px 6px;
79
- border: 1px solid transparent;
80
- box-sizing: border-box;
81
- cursor: pointer; }
82
- div.dt-datetime div.dt-datetime-label:hover {
83
- border: 1px solid #ddd;
84
- border-radius: 2px;
85
- background-color: #f5f5f5; }
86
- div.dt-datetime div.dt-datetime-label select {
87
- position: absolute;
88
- top: 6px;
89
- left: 0;
90
- cursor: pointer;
91
- opacity: 0; }
92
- div.dt-datetime.horizontal {
93
- width: 550px; }
94
- div.dt-datetime.horizontal div.dt-datetime-date,
95
- div.dt-datetime.horizontal div.dt-datetime-time {
96
- width: 48%; }
97
- div.dt-datetime.horizontal div.dt-datetime-time {
98
- margin-left: 4%; }
99
- div.dt-datetime div.dt-datetime-date {
100
- position: relative;
101
- float: left;
102
- width: 100%; }
103
- div.dt-datetime div.dt-datetime-time {
104
- position: relative;
105
- float: left;
106
- width: 100%;
107
- text-align: center; }
108
- div.dt-datetime div.dt-datetime-time > span {
109
- vertical-align: middle; }
110
- div.dt-datetime div.dt-datetime-time th {
111
- text-align: left; }
112
- div.dt-datetime div.dt-datetime-time div.dt-datetime-timeblock {
113
- display: inline-block;
114
- vertical-align: middle; }
115
- div.dt-datetime div.dt-datetime-iconLeft,
116
- div.dt-datetime div.dt-datetime-iconRight,
117
- div.dt-datetime div.dt-datetime-iconUp,
118
- div.dt-datetime div.dt-datetime-iconDown {
119
- width: 30px;
120
- height: 30px;
121
- background-position: center;
122
- background-repeat: no-repeat;
123
- opacity: 0.3;
124
- overflow: hidden;
125
- box-sizing: border-box; }
126
- div.dt-datetime div.dt-datetime-iconLeft:hover,
127
- div.dt-datetime div.dt-datetime-iconRight:hover,
128
- div.dt-datetime div.dt-datetime-iconUp:hover,
129
- div.dt-datetime div.dt-datetime-iconDown:hover {
130
- border: 1px solid #ccc;
131
- border-radius: 2px;
132
- background-color: #f0f0f0;
133
- opacity: 0.6; }
134
- div.dt-datetime div.dt-datetime-iconLeft button,
135
- div.dt-datetime div.dt-datetime-iconRight button,
136
- div.dt-datetime div.dt-datetime-iconUp button,
137
- div.dt-datetime div.dt-datetime-iconDown button {
138
- border: none;
139
- background: transparent;
140
- text-indent: 30px;
141
- height: 100%;
142
- width: 100%;
143
- cursor: pointer; }
144
- div.dt-datetime div.dt-datetime-iconLeft {
145
- position: absolute;
146
- top: 5px;
147
- left: 5px;
148
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg=="); }
149
- div.dt-datetime div.dt-datetime-iconRight {
150
- position: absolute;
151
- top: 5px;
152
- right: 5px;
153
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII="); }
154
- div.dt-datetime div.dt-datetime-iconUp {
155
- height: 20px;
156
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAALCAMAAABf9c24AAAAFVBMVEX///99fX1+fn57e3t6enoAAAAAAAC73bqPAAAABnRSTlMAYmJkZt92bnysAAAAL0lEQVR4AWOgJmBhxCvLyopHnpmVjY2VCadeoCxIHrcsWJ4RlyxCHlMWCTBRJxwAjrIBDMWSiM0AAAAASUVORK5CYII="); }
157
- div.dt-datetime div.dt-datetime-iconDown {
158
- height: 20px;
159
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAALCAMAAABf9c24AAAAFVBMVEX///99fX1+fn57e3t6enoAAAAAAAC73bqPAAAABnRSTlMAYmJkZt92bnysAAAAMElEQVR4AWOgDmBiRQIsmPKMrGxQgJDFlEfIYpoPk8Utz8qM232MYFfhkQfKUg8AANefAQxecJ58AAAAAElFTkSuQmCC"); }
160
-
161
- div.dt-datetime-error {
162
- clear: both;
163
- padding: 0 1em;
164
- max-width: 240px;
165
- font-size: 11px;
166
- line-height: 1.25em;
167
- text-align: center;
168
- color: #b11f1f; }
@@ -1,26 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <title>DateTime simple example</title>
5
-
6
- <meta charset="UTF-8">
7
-
8
- <link rel="stylesheet" href="../dist/dateTime.css">
9
-
10
- <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
11
- <script src="../dist/dateTime.js"></script>
12
- <script>
13
- $(document).ready(function() {
14
- new DateTime(document.getElementById('test'), {});
15
- });
16
- </script>
17
- </head>
18
- <body>
19
- <h1>DateTime simple example</h1>
20
- <p>This example shows the date / time input with simple initilaisation.</p>
21
-
22
- <p>
23
- <input id="test" type="text" value="2020-01-17" />
24
- </p>
25
- </body>
26
- </html>
@@ -1,29 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <title>DateTime - date and time example</title>
5
-
6
- <meta charset="UTF-8">
7
-
8
- <link rel="stylesheet" href="../dist/dateTime.css">
9
-
10
- <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
11
- <script src="http://code.jquery.com/jquery-3.4.1.min.js"></script>
12
- <script src="../dist/dateTime.js"></script>
13
- <script>
14
- $(document).ready(function() {
15
- new DateTime(document.getElementById('test'), {
16
- format: 'D MMM YYYY HH:mm'
17
- });
18
- });
19
- </script>
20
- </head>
21
- <body>
22
- <h1>DateTime - date and time example</h1>
23
- <p>This example shows the date / time input used for both date and time inputs.</p>
24
-
25
- <p>
26
- <input id="test" type="text" value="17 Jan 2020 12:19" />
27
- </p>
28
- </body>
29
- </html>
@@ -1,32 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <title>DateTime with DayJS formatting example</title>
5
-
6
- <meta charset="UTF-8">
7
-
8
- <link rel="stylesheet" href="../dist/dateTime.css">
9
-
10
- <script src="https://cdnjs.cloudflare.com/ajax/libs/dayjs/1.8.17/dayjs.min.js"></script>
11
- <script src="https://cdnjs.cloudflare.com/ajax/libs/dayjs/1.8.17/plugin/utc.js"></script>
12
- <script src="http://code.jquery.com/jquery-3.4.1.min.js"></script>
13
- <script src="../dist/dateTime.js"></script>
14
- <script>
15
- dayjs.extend(dayjs_plugin_utc);
16
-
17
- $(document).ready(function() {
18
- new DateTime(document.getElementById('test'), {
19
- format: 'D/M/YYYY'
20
- });
21
- });
22
- </script>
23
- </head>
24
- <body>
25
- <h1>DateTime with DayJS formatting example</h1>
26
- <p>This example shows the date / time input with DayJS used for the formatting rather than Moment. Note that you also need the DayJS `UTC` plugin.</p>
27
-
28
- <p>
29
- <input id="test" type="text" value="17/1/2020" />
30
- </p>
31
- </body>
32
- </html>
@@ -1,26 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <title>DateTime with hidden input example</title>
5
-
6
- <meta charset="UTF-8">
7
-
8
- <link rel="stylesheet" href="../dist/dateTime.css">
9
-
10
- <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
11
- <script src="../dist/dateTime.js"></script>
12
- <script>
13
- $(document).ready(function() {
14
- new DateTime(document.getElementById('test'), {});
15
- });
16
- </script>
17
- </head>
18
- <body>
19
- <h1>DateTime with hidden input example</h1>
20
- <p>When DateTime is assigned a `hidden` input element, the picker will always be shown on the page, inline with the hidden input element.</p>
21
-
22
- <p>
23
- <input id="test" type="hidden" value="2020-01-17" />
24
- </p>
25
- </body>
26
- </html>
@@ -1,26 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <title>DateTime with jQuery init example</title>
5
-
6
- <meta charset="UTF-8">
7
-
8
- <link rel="stylesheet" href="../dist/dateTime.css">
9
-
10
- <script src="http://code.jquery.com/jquery-3.4.1.min.js"></script>
11
- <script src="../dist/dateTime.js"></script>
12
- <script>
13
- $(document).ready(function() {
14
- $('#test').dtDateTime();
15
- });
16
- </script>
17
- </head>
18
- <body>
19
- <h1>DateTime with jQuery init example</h1>
20
- <p>This example shows the date / time input initialised via jQuery.</p>
21
-
22
- <p>
23
- <input id="test" type="text" value="2020-01-17" />
24
- </p>
25
- </body>
26
- </html>
@@ -1,29 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <title>DateTime with Moment formatting example</title>
5
-
6
- <meta charset="UTF-8">
7
-
8
- <link rel="stylesheet" href="../dist/dateTime.css">
9
-
10
- <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
11
- <script src="http://code.jquery.com/jquery-3.4.1.min.js"></script>
12
- <script src="../dist/dateTime.js"></script>
13
- <script>
14
- $(document).ready(function() {
15
- new DateTime(document.getElementById('test'), {
16
- format: 'D/M/YYYY'
17
- });
18
- });
19
- </script>
20
- </head>
21
- <body>
22
- <h1>DateTime with Moment formatting example</h1>
23
- <p>This example shows the date / time input with Moment used for the formatting.</p>
24
-
25
- <p>
26
- <input id="test" type="text" value="17/1/2020" />
27
- </p>
28
- </body>
29
- </html>
@@ -1,39 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <title>DateTime simple example</title>
5
-
6
- <meta charset="UTF-8">
7
-
8
- <link rel="stylesheet" href="../dist/dateTime.css">
9
-
10
- <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
11
- <script src="http://code.jquery.com/jquery-3.4.1.min.js"></script>
12
- <script src="../dist/dateTime.js"></script>
13
- <script>
14
- $(document).ready(function() {
15
- new DateTime(document.getElementById('test'), {
16
- attachTo: 'input',
17
- format: 'D MMM YYYY HH:mm'
18
- });
19
-
20
- new DateTime(document.getElementById('test2'), {
21
- attachTo: 'input',
22
- format: 'D MMM YYYY HH:mm'
23
- });
24
- });
25
- </script>
26
- </head>
27
- <body>
28
- <h1>DateTime right aligned example</h1>
29
- <p>This shows adjustment to the selector position if it isn't fully visible.</p>
30
-
31
- <p>
32
- <input id="test" type="text" value="2020-01-17" style="float: right" />
33
- </p>
34
-
35
- <p style="position: absolute; top: 200px; left: 50px; right: 0;">
36
- <input id="test2" type="text" value="2020-01-17" style="float: right" />
37
- </p>
38
- </body>
39
- </html>