gpt4 book ai didi

Angular Material : How to format datepicker day label?

转载 作者:行者123 更新时间:2023-12-04 13:12:13 25 4
gpt4 key购买 nike

是否可以将日期标签从 2 个字符更改为 3 个字符?
从:
enter image description here
到:
enter image description here
我在文档中找不到任何对此的引用。

最佳答案

Angular Material Datepicker 工作日标题可以通过扩展 MomentDateAdapter 来定制。 .

@Injectable()
class CustomDateAdapter extends MomentDateAdapter {
getDayOfWeekNames(style: 'long' | 'short' | 'narrow') {
return ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
}
}
Stackblitz demo .

引用
此答案最初由 Andrew Seguin 提供回复 Angular Components issue #16240 .

关于 Angular Material : How to format datepicker day label?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64055877/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com