@webtypen/webframez-core 0.3.22 → 0.3.23
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.
|
@@ -549,6 +549,9 @@ class Datatable {
|
|
|
549
549
|
}
|
|
550
550
|
break;
|
|
551
551
|
}
|
|
552
|
+
if (tempType === "date") {
|
|
553
|
+
value = value.date1;
|
|
554
|
+
}
|
|
552
555
|
if (value !== undefined && filterEl && filterEl.cast) {
|
|
553
556
|
if (typeof filterEl.cast === "function") {
|
|
554
557
|
value = yield filterEl.cast(value, entry, req);
|
|
@@ -570,6 +573,9 @@ class Datatable {
|
|
|
570
573
|
else if (filterEl.cast === "boolean") {
|
|
571
574
|
value = value === true || value === 1 || value.toString() === "1" || value.toString() === "true" ? true : { $ne: true };
|
|
572
575
|
}
|
|
576
|
+
else if (filterEl.cast === "date") {
|
|
577
|
+
value = value ? (0, moment_1.default)(value).toDate() : null;
|
|
578
|
+
}
|
|
573
579
|
}
|
|
574
580
|
if (value !== undefined) {
|
|
575
581
|
out[filterEl && filterEl.mapping && filterEl.mapping.trim() !== "" ? filterEl.mapping : key] = value;
|
package/package.json
CHANGED
|
@@ -558,6 +558,10 @@ export class Datatable {
|
|
|
558
558
|
break;
|
|
559
559
|
}
|
|
560
560
|
|
|
561
|
+
if (tempType === "date") {
|
|
562
|
+
value = value.date1;
|
|
563
|
+
}
|
|
564
|
+
|
|
561
565
|
if (value !== undefined && filterEl && filterEl.cast) {
|
|
562
566
|
if (typeof filterEl.cast === "function") {
|
|
563
567
|
value = await filterEl.cast(value, entry, req);
|
|
@@ -573,6 +577,8 @@ export class Datatable {
|
|
|
573
577
|
value = parseFloat(value);
|
|
574
578
|
} else if (filterEl.cast === "boolean") {
|
|
575
579
|
value = value === true || value === 1 || value.toString() === "1" || value.toString() === "true" ? true : { $ne: true };
|
|
580
|
+
} else if (filterEl.cast === "date") {
|
|
581
|
+
value = value ? moment(value).toDate() : null;
|
|
576
582
|
}
|
|
577
583
|
}
|
|
578
584
|
|