@cocreate/element-prototype 1.11.7 → 1.12.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ # [1.12.0](https://github.com/CoCreate-app/CoCreate-element-prototype/compare/v1.11.8...v1.12.0) (2023-11-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * favicon.ico path ([7570a08](https://github.com/CoCreate-app/CoCreate-element-prototype/commit/7570a0887e2aefac5f8f52d8b98a33f377c49183))
7
+ * update dependencies to the lates versions ([871484a](https://github.com/CoCreate-app/CoCreate-element-prototype/commit/871484ab69816515ca968599c72bc23432e1f6e0))
8
+
9
+
10
+ ### Features
11
+
12
+ * converts input type date to systems local date timezone ([4235ceb](https://github.com/CoCreate-app/CoCreate-element-prototype/commit/4235ceb2ddb1a9aca026864a53c2418ff47b3d52))
13
+
14
+ ## [1.11.8](https://github.com/CoCreate-app/CoCreate-element-prototype/compare/v1.11.7...v1.11.8) (2023-10-25)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * bump dependencies ([8a370f2](https://github.com/CoCreate-app/CoCreate-element-prototype/commit/8a370f2007faa815f67ed01cb12059c164653677))
20
+
1
21
  ## [1.11.7](https://github.com/CoCreate-app/CoCreate-element-prototype/compare/v1.11.6...v1.11.7) (2023-10-22)
2
22
 
3
23
 
package/demo/index.html CHANGED
@@ -6,9 +6,9 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1" />
7
7
  <link
8
8
  rel="icon"
9
- href="https://cdn.cocreate.app/favicon.ico"
10
- type="image/ico"
11
- sizes="16x16" />
9
+ type="image/png"
10
+ sizes="32x32"
11
+ href="../assets/favicon.ico" />
12
12
  <title>element-prototype | CoCreateJS</title>
13
13
  <link rel="manifest" href="/manifest.webmanifest" />
14
14
  </head>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/element-prototype",
3
- "version": "1.11.7",
3
+ "version": "1.12.0",
4
4
  "description": "A simple element-prototype component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "element-prototype",
@@ -58,6 +58,6 @@
58
58
  "webpack-log": "^3.0.1"
59
59
  },
60
60
  "dependencies": {
61
- "@cocreate/utils": "^1.25.3"
61
+ "@cocreate/utils": "^1.26.2"
62
62
  }
63
63
  }
package/src/setValue.js CHANGED
@@ -61,6 +61,10 @@ const setValue = (el, value) => {
61
61
  el.value == value ? el.checked = true : el.checked = false;
62
62
  } else if (el.type === 'password') {
63
63
  el.value = __decryptPassword(value);
64
+ } else if (["date", "time", "datetime", "datetime-local", "month", "week"].includes(el.type)) {
65
+ let date = new Date(el.value);
66
+ date = new Date(date.getTime() - date.getTimezoneOffset() * 60000);
67
+ el.value = date.toISOString();
64
68
  } else if (el.tagName == "SELECT" && el.hasAttribute('multiple') && Array.isArray(value)) {
65
69
  let options = el.options;
66
70
  for (let i = 0; i < options.length; i++) {