@aemforms/af-core 0.22.91 → 0.22.93
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/esm/afb-runtime.js +3 -3
- package/lib/DateField.js +3 -3
- package/package.json +2 -2
package/esm/afb-runtime.js
CHANGED
|
@@ -4409,9 +4409,9 @@ class DateField extends Field {
|
|
|
4409
4409
|
}
|
|
4410
4410
|
else {
|
|
4411
4411
|
if (this._jsonModel.editFormat !== 'short' && this._jsonModel.editFormat !== 'date|short') {
|
|
4412
|
-
const
|
|
4413
|
-
if (
|
|
4414
|
-
super.value = formatDate(
|
|
4412
|
+
const parsedDate = parseDate(value, this.locale, this._jsonModel.editFormat) || parseDate(value, this.locale, 'yyyy-MM-dd');
|
|
4413
|
+
if (parsedDate instanceof Date) {
|
|
4414
|
+
super.value = formatDate(parsedDate, this.locale, this._dataFormat);
|
|
4415
4415
|
}
|
|
4416
4416
|
else {
|
|
4417
4417
|
super.value = value;
|
package/lib/DateField.js
CHANGED
|
@@ -38,9 +38,9 @@ class DateField extends Field_1.default {
|
|
|
38
38
|
}
|
|
39
39
|
else {
|
|
40
40
|
if (this._jsonModel.editFormat !== 'short' && this._jsonModel.editFormat !== 'date|short') {
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
43
|
-
super.value = (0, af_formatters_1.formatDate)(
|
|
41
|
+
const parsedDate = (0, af_formatters_1.parseDate)(value, this.locale, this._jsonModel.editFormat) || (0, af_formatters_1.parseDate)(value, this.locale, 'yyyy-MM-dd');
|
|
42
|
+
if (parsedDate instanceof Date) {
|
|
43
|
+
super.value = (0, af_formatters_1.formatDate)(parsedDate, this.locale, this._dataFormat);
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
46
|
super.value = value;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aemforms/af-core",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.93",
|
|
4
4
|
"description": "Core Module for Forms Runtime",
|
|
5
5
|
"author": "Adobe Systems",
|
|
6
6
|
"license": "Adobe Proprietary",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@adobe/json-formula": "0.1.50",
|
|
40
|
-
"@aemforms/af-formatters": "^0.22.
|
|
40
|
+
"@aemforms/af-formatters": "^0.22.93"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@babel/preset-env": "^7.20.2",
|