@aemforms/af-core 0.22.91 → 0.22.92

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.
@@ -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 date = parseDate(value, this.locale, this._jsonModel.editFormat);
4413
- if (date !== null) {
4414
- super.value = formatDate(date, this.locale, this._dataFormat);
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 date = (0, af_formatters_1.parseDate)(value, this.locale, this._jsonModel.editFormat);
42
- if (date !== null) {
43
- super.value = (0, af_formatters_1.formatDate)(date, this.locale, this._dataFormat);
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.91",
3
+ "version": "0.22.92",
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.91"
40
+ "@aemforms/af-formatters": "^0.22.92"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@babel/preset-env": "^7.20.2",