微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

使用MomentDateAdapter的Mat-Date-Picker,输出Date而不是Moment日期

如何解决使用MomentDateAdapter的Mat-Date-Picker,输出Date而不是Moment日期

已将mat-date-picker连接到用作FormControl的输入,是否有任何方法可以干扰mat-date-picker输出? (将其转换为常规Date而不是Moment)。

由于MomentDateAdapter的语言环境不兼容,我使用的是MatNativeDateModule而不是# Storing the names and directions of users: David = "Directions to David's home from T... \n East on X,\n South on Y.," \ " \n West on Z.,\n South on A.,\n first white house on the right." Caroline = "Directions to Caroline's home from T... \n East on x,\n South on y.," \ " \n East on z.,\n South on p.,\n East on q," \ " \n West on t.,\n last brick house in the cul-de-sac." William = "Directions to Will's home from T... \n East on x," \ " \n West on z.,\n South on Fa.,\n West on b.,\n first house on the right." Bannon = "<Insert directions to Bannon's house>" # User gives a specific name and then receives a location: while True: destination = input("Where would you like to go? ") if destination.casefold() == 'Davids house': print(David) continue elif destination.casefold() == 'Carolines house': print(Caroline) continue elif destination.casefold() == 'Wills house': print(William) continue elif destination.casefold() == 'Bannons house': print(Bannon) continue # If an invalid location is given,this code will run: else: print("Sorry,that location wasn't found! Please try again.") continue

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?