@hailin-zheng/editor-core 2.1.3 → 2.1.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.
package/index-cjs.js CHANGED
@@ -26427,9 +26427,10 @@ class EditorCalendarVNode {
26427
26427
  this.currTime.value = null;
26428
26428
  this.selectedTime.value = null;
26429
26429
  }
26430
- render(position, dataValue) {
26430
+ render(position, dataValue, format = 'YYYY-MM-DD HH:mm:ss') {
26431
+ format = format ?? 'YYYY-MM-DD HH:mm:ss';
26431
26432
  if (!this.currentDate && dataValue) {
26432
- const currDataValue = moment__default["default"](dataValue);
26433
+ const currDataValue = moment__default["default"](dataValue, format);
26433
26434
  this.currYear.value = currDataValue.year();
26434
26435
  this.currMonth.value = currDataValue.month();
26435
26436
  this.selectedDate.value = currDataValue.format('YYYY-MM-DD');
@@ -28589,7 +28590,7 @@ class DocEditor {
28589
28590
  if (!dataEle.isValid(currVal)) {
28590
28591
  currVal = '';
28591
28592
  }
28592
- return calendar.render(position, currVal);
28593
+ return calendar.render(position, currVal, dataEle.props.format);
28593
28594
  }
28594
28595
  calendar.reset();
28595
28596
  return null;
@@ -28653,7 +28654,7 @@ class DocEditor {
28653
28654
  rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
28654
28655
  }
28655
28656
  version() {
28656
- return "2.1.3";
28657
+ return "2.1.4";
28657
28658
  }
28658
28659
  }
28659
28660