你能告诉我为什么会出现这种奇怪的行为吗?这是由于传入日期格式问题还是其他?
html的
<ion-datetime displayFormat="D MMM, YYYY" [min]="minDate" [max]="maxDate"
[ngModel]="data?.dueOn" (ngModelChange)="data.dueOn=$event;"
name="dueOn" class="date-picker-right-align"></ion-datetime>
.TS
auditLogDueOnDays = `Payment due date changed from
${moment(this.oldTransactionValue.dueOn).format("d MMM YY")} to
${moment(data.dueOn).format("d MMM YY")} `;
答案 0 :(得分:0)
那是我的坏事:(
星期几d 0 1 ... 5 6
我必须使用:
日期D 1 2 ... 30 31
auditLogDueOnDays = `Payment due date changed from
${moment(this.oldTransactionValue.dueOn).format("D MMM YY")} to
${moment(data.dueOn).format("D MMM YY")} `;