sf-crud 12.0.1-beta41 → 12.0.1-beta43

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.
@@ -734,6 +734,8 @@
734
734
  this.loadDataFromService();
735
735
  if (this.value && this.control.subtype == 'autocomplete')
736
736
  this.setDefaultValue();
737
+ if (this.value && this.control.type == 'date')
738
+ this.setDate();
737
739
  };
738
740
  ControlComponent.prototype.sendValue = function () {
739
741
  this.setValue.emit(this.value);
@@ -834,6 +836,13 @@
834
836
  _this.sendNotification.emit({ severity: 'error', detail: "Error al consumir el servicio." });
835
837
  });
836
838
  };
839
+ ControlComponent.prototype.setDate = function () {
840
+ var format = this.control.formatMoment;
841
+ if (format && this.value) {
842
+ this.value = moment__namespace(this.value, format).toDate();
843
+ this.sendValue();
844
+ }
845
+ };
837
846
  return ControlComponent;
838
847
  }());
839
848
  ControlComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ControlComponent, deps: [{ token: GeneralService }], target: i0__namespace.ɵɵFactoryTarget.Component });