sf-crud 12.0.1-beta42 → 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.
- package/bundles/sf-crud.umd.js +9 -3
- package/bundles/sf-crud.umd.js.map +1 -1
- package/esm2015/lib/components/control/control.component.js +11 -1
- package/esm2015/lib/components/registro/registro.component.js +1 -4
- package/fesm2015/sf-crud.js +9 -3
- package/fesm2015/sf-crud.js.map +1 -1
- package/lib/components/control/control.component.d.ts +1 -0
- package/package.json +1 -1
package/bundles/sf-crud.umd.js
CHANGED
|
@@ -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 });
|
|
@@ -1180,9 +1189,6 @@
|
|
|
1180
1189
|
else
|
|
1181
1190
|
_this.data = res.data;
|
|
1182
1191
|
_this.trx = 'u';
|
|
1183
|
-
if (_this.data && _this.data.fecha) {
|
|
1184
|
-
_this.data.fecha = moment__namespace(_this.data.fecha).toDate();
|
|
1185
|
-
}
|
|
1186
1192
|
}
|
|
1187
1193
|
else {
|
|
1188
1194
|
_this.trx = 'c';
|