@genesislcap/foundation-forms 14.183.2 → 14.183.4

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.
@@ -16,20 +16,17 @@ export const DateControlRendererTemplate = (prefix = 'zero') => html `
16
16
  >
17
17
  <${prefix}-text-field
18
18
  :value=${(x) => {
19
+ if (!x.control.data)
20
+ return '';
19
21
  const type = typeSwitch(x.control);
20
- const formats = {
21
- year: 'numeric',
22
- month: '2-digit',
23
- day: '2-digit',
24
- timeZone: 'UTC',
25
- };
26
- if (type === 'datetime-local') {
27
- formats.hour = '2-digit:'; // need the : otherwise the format is invalid
28
- formats.minute = '2-digit';
29
- }
30
- return x.control.data === undefined || x.control.data === null
31
- ? ''
32
- : new Intl.DateTimeFormat('fr-CA', formats).format(x.control.data);
22
+ const date = new Date(x.control.data);
23
+ const padded = (dateComponent) => dateComponent.toString().padStart(2, '0');
24
+ const year = date.getUTCFullYear();
25
+ const month = padded(date.getUTCMonth() + 1);
26
+ const day = padded(date.getUTCDate());
27
+ const hour = padded(date.getUTCHours());
28
+ const minute = padded(date.getUTCMinutes());
29
+ return (`${year}-${month}-${day}` + (type === 'datetime-local' ? ` ${hour}:${minute}` : ''));
33
30
  }}
34
31
  id=${(x) => x.control.path}
35
32
  type="${(x) => typeSwitch(x.control)}"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-forms",
3
3
  "description": "Genesis Foundation Forms",
4
- "version": "14.183.2",
4
+ "version": "14.183.4",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -40,22 +40,22 @@
40
40
  "test:debug": "genx test --debug"
41
41
  },
42
42
  "devDependencies": {
43
- "@genesislcap/foundation-testing": "14.183.2",
44
- "@genesislcap/genx": "14.183.2",
45
- "@genesislcap/rollup-builder": "14.183.2",
46
- "@genesislcap/ts-builder": "14.183.2",
47
- "@genesislcap/uvu-playwright-builder": "14.183.2",
48
- "@genesislcap/vite-builder": "14.183.2",
49
- "@genesislcap/webpack-builder": "14.183.2",
43
+ "@genesislcap/foundation-testing": "14.183.4",
44
+ "@genesislcap/genx": "14.183.4",
45
+ "@genesislcap/rollup-builder": "14.183.4",
46
+ "@genesislcap/ts-builder": "14.183.4",
47
+ "@genesislcap/uvu-playwright-builder": "14.183.4",
48
+ "@genesislcap/vite-builder": "14.183.4",
49
+ "@genesislcap/webpack-builder": "14.183.4",
50
50
  "@types/json-schema": "^7.0.11",
51
51
  "rimraf": "^3.0.2"
52
52
  },
53
53
  "dependencies": {
54
- "@genesislcap/foundation-comms": "14.183.2",
55
- "@genesislcap/foundation-criteria": "14.183.2",
56
- "@genesislcap/foundation-logger": "14.183.2",
57
- "@genesislcap/foundation-ui": "14.183.2",
58
- "@genesislcap/foundation-utils": "14.183.2",
54
+ "@genesislcap/foundation-comms": "14.183.4",
55
+ "@genesislcap/foundation-criteria": "14.183.4",
56
+ "@genesislcap/foundation-logger": "14.183.4",
57
+ "@genesislcap/foundation-ui": "14.183.4",
58
+ "@genesislcap/foundation-utils": "14.183.4",
59
59
  "@json-schema-tools/dereferencer": "^1.6.1",
60
60
  "@jsonforms/core": "^3.2.1",
61
61
  "@microsoft/fast-components": "^2.30.6",
@@ -76,5 +76,5 @@
76
76
  "access": "public"
77
77
  },
78
78
  "customElements": "dist/custom-elements.json",
79
- "gitHead": "fcec30e0c7127ead30b2eee7ac82eddf25d75daf"
79
+ "gitHead": "ba6d12c3196029a1d6d68335fd6da494139a6afc"
80
80
  }