endof('day') addition when no time is present as we are using new datepicker calendar now.

This commit is contained in:
Jatin_Chugh
2023-07-27 11:14:49 +05:30
parent aa7daae6b9
commit 7a66328372
@@ -115,7 +115,7 @@ export class CardViewDateItemComponent extends BaseCardView<CardViewDateItemMode
onDateChanged(newDateValue) {
if (newDateValue) {
const momentDate = moment(newDateValue.value, this.dateFormat, true);
const momentDate = moment(newDateValue.value, this.dateFormat, true).endOf('day');
if (momentDate.isValid()) {
this.valueDate = momentDate;
this.property.value = momentDate.toDate();
@@ -138,7 +138,7 @@ export class CardViewDateItemComponent extends BaseCardView<CardViewDateItemMode
addDateToList(newDateValue) {
if (newDateValue) {
const momentDate = moment(newDateValue.value, this.dateFormat, true);
const momentDate = moment(newDateValue.value, this.dateFormat, true).endOf('day');
if (momentDate.isValid()) {
this.property.value.push(momentDate.toDate());
this.update();