@osimatic/helpers-js 1.1.16 → 1.1.18
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/date_time.js +14 -0
- package/package.json +1 -1
- package/select_all.js +3 -1
package/date_time.js
CHANGED
|
@@ -88,6 +88,13 @@ class DateTime {
|
|
|
88
88
|
return this.getSqlDate(jsDate)+' '+this.getSqlTime(jsDate);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
static getDateForInputDate(jsDate, timeZone="Europe/Paris") {
|
|
92
|
+
return this.getSqlDate(jsDate, timeZone);
|
|
93
|
+
}
|
|
94
|
+
static getTimeForInputTime(jsDate, timeZone="Europe/Paris") {
|
|
95
|
+
return jsDate.toLocaleTimeString('en-GB', {hour: 'numeric', timeZone: timeZone, hour12: false}).padStart(2, '0')+':'+jsDate.toLocaleTimeString('en-GB', {minute: 'numeric', timeZone: timeZone, hour12: false}).padStart(2, '0');
|
|
96
|
+
}
|
|
97
|
+
|
|
91
98
|
static getTimestamp(jsDate) {
|
|
92
99
|
return jsDate.getTime();
|
|
93
100
|
}
|
|
@@ -332,6 +339,13 @@ class TimestampUnix {
|
|
|
332
339
|
return DateTime.getSqlTime(this.parse(timestamp), timeZone);
|
|
333
340
|
}
|
|
334
341
|
|
|
342
|
+
static getDateForInputDate(timestamp, timeZone="Europe/Paris") {
|
|
343
|
+
return DateTime.getDateForInputDate(this.parse(timestamp), timeZone);
|
|
344
|
+
}
|
|
345
|
+
static getTimeForInputTime(timestamp, timeZone="Europe/Paris") {
|
|
346
|
+
return DateTime.getTimeForInputTime(this.parse(timestamp), timeZone);
|
|
347
|
+
}
|
|
348
|
+
|
|
335
349
|
static isDateEqual(timestamp1, timestamp2) {
|
|
336
350
|
return DateTime.isDateEqual(this.parse(timestamp1), this.parse(timestamp2));
|
|
337
351
|
}
|
package/package.json
CHANGED
package/select_all.js
CHANGED
|
@@ -95,7 +95,9 @@ class SelectAll {
|
|
|
95
95
|
div.find('div.checkbox, div.form-check').find('input[type="checkbox"]').change(function() {
|
|
96
96
|
SelectAll.updateDiv($(this).closest('div.checkbox_with_check_all'));
|
|
97
97
|
});
|
|
98
|
-
|
|
98
|
+
div.find('div.checkbox_with_check_all').each(function(idx, divWithCheckAll) {
|
|
99
|
+
SelectAll.updateDiv($(divWithCheckAll));
|
|
100
|
+
});
|
|
99
101
|
}
|
|
100
102
|
|
|
101
103
|
static updateDiv(div) {
|