@mediusinc/mng-commons 5.4.0-rc.4 → 5.4.0-rc.5
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/esm2022/table/components/table/table.component.mjs +6 -6
- package/esm2022/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.mjs +23 -3
- package/fesm2022/mediusinc-mng-commons-table.mjs +5 -5
- package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +22 -2
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/package.json +7 -7
- package/table/components/table/table.component.d.ts +2 -2
- package/version-info.json +5 -5
|
@@ -4688,10 +4688,30 @@ class FormlyFieldDatepickerComponent extends ACommonsFormlyFieldType {
|
|
|
4688
4688
|
noMillis: !this.dateTimeWithMillis,
|
|
4689
4689
|
noTimezone: this.descriptor.datePickerValueNoTimezone ?? !this.dateTimeWithTimezone
|
|
4690
4690
|
};
|
|
4691
|
+
let dateValue;
|
|
4692
|
+
if (typeof value === 'string' || typeof value === 'number') {
|
|
4693
|
+
dateValue = new Date(value);
|
|
4694
|
+
}
|
|
4695
|
+
else {
|
|
4696
|
+
dateValue = value;
|
|
4697
|
+
}
|
|
4698
|
+
if (dateValue !== null && dateValue !== undefined) {
|
|
4699
|
+
if (this.descriptor.datePickerShowTime) {
|
|
4700
|
+
if (this.descriptor.datePickerShowSeconds) {
|
|
4701
|
+
dateValue.setMilliseconds(0);
|
|
4702
|
+
}
|
|
4703
|
+
else {
|
|
4704
|
+
dateValue.setSeconds(0, 0);
|
|
4705
|
+
}
|
|
4706
|
+
}
|
|
4707
|
+
else {
|
|
4708
|
+
dateValue.setHours(0, 0, 0, 0);
|
|
4709
|
+
}
|
|
4710
|
+
}
|
|
4691
4711
|
if (!this.descriptor.datePickerValueAsDateObj) {
|
|
4692
|
-
return dateToIsoString(
|
|
4712
|
+
return dateToIsoString(dateValue, convertDateType, convertDateTimeOpts);
|
|
4693
4713
|
}
|
|
4694
|
-
return
|
|
4714
|
+
return dateValue;
|
|
4695
4715
|
}
|
|
4696
4716
|
areDateValuesEqual(val1, val2) {
|
|
4697
4717
|
const date1 = this.convertDateValue(val1);
|