如何解决使用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 举报,一经查实,本站将立刻删除。