是否可以将空值设置为md-datepicker?
<md-datepicker ng-model="vm.activity.myDate" md-placeholder="myDate" />
在我的 Controller 中,我尝试将日期设置为空,但它始终显示1/1/1901
if (row.entity.DataSchedulazione == '')
row.entity.DataSchedulazione = null;
有什么帮助吗?
最佳答案
我试过了,它没有显示 1/1/1901。 CodePen link
您的代码将 null 设置为
row.entity.DataSchedulazione
,而不是 vm.activity.myDate。
关于javascript - Angular Material md-datepicker 中的空值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36644941/