@optionfactory/ful 7.0.4 → 7.0.5
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/ful.iife.js +4 -2
- package/dist/ful.iife.js.map +1 -1
- package/dist/ful.iife.min.js +1 -1
- package/dist/ful.iife.min.js.map +1 -1
- package/dist/ful.min.mjs +1 -1
- package/dist/ful.min.mjs.map +1 -1
- package/dist/ful.mjs +4 -2
- package/dist/ful.mjs.map +1 -1
- package/package.json +1 -1
package/dist/ful.mjs
CHANGED
|
@@ -1699,8 +1699,10 @@ class InputLocalDate extends Input {
|
|
|
1699
1699
|
if (!v) {
|
|
1700
1700
|
return '';
|
|
1701
1701
|
}
|
|
1702
|
+
//this could be date.toLocaleDateString('en-CA')
|
|
1703
|
+
const formatLocalDate = (date) => new Date(date.getTime() - (date.getTimezoneOffset() * 60000)).toISOString().split("T")[0];
|
|
1702
1704
|
if (v === 'now') {
|
|
1703
|
-
return new Date()
|
|
1705
|
+
return formatLocalDate(new Date());
|
|
1704
1706
|
}
|
|
1705
1707
|
const re = /^([+-])(\d+)([dmy])$/;
|
|
1706
1708
|
const match = re.exec(v);
|
|
@@ -1726,7 +1728,7 @@ class InputLocalDate extends Input {
|
|
|
1726
1728
|
r.setFullYear(r.getFullYear() + offset * sign);
|
|
1727
1729
|
break;
|
|
1728
1730
|
}
|
|
1729
|
-
return r
|
|
1731
|
+
return formatLocalDate(r);
|
|
1730
1732
|
}
|
|
1731
1733
|
}
|
|
1732
1734
|
|