@astroapps/forms-core 2.0.0 → 2.0.2

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/lib/index.cjs CHANGED
@@ -1,4 +1,5 @@
1
1
  var controls = require('@astroapps/controls');
2
+ var date = require('@internationalized/date');
2
3
  var jsonata = require('jsonata');
3
4
  var uuid = require('uuid');
4
5
 
@@ -1173,7 +1174,11 @@ var DefaultSchemaInterface = /*#__PURE__*/function () {
1173
1174
  }
1174
1175
  if (parseDateTime === void 0) {
1175
1176
  parseDateTime = function parseDateTime(s) {
1176
- return Date.parse(s);
1177
+ try {
1178
+ return date.parseDateTime(s).toDate("UTC").getTime();
1179
+ } catch (e) {
1180
+ return Number.NaN;
1181
+ }
1177
1182
  };
1178
1183
  }
1179
1184
  this.boolStrings = void 0;
@@ -2393,7 +2398,7 @@ function resolveArrayChildren(data, node, adjustChild) {
2393
2398
  var singleChild = childCount === 1 ? childNodes[0] : null;
2394
2399
  return data.control.as().elements.map(function (x, i) {
2395
2400
  return {
2396
- childKey: x.uniqueId,
2401
+ childKey: x.uniqueId + "/" + i,
2397
2402
  create: function create() {
2398
2403
  var _adjustChild;
2399
2404
  return _extends({