如何进行日期选择器自定义?

发布于 2025-01-11 03:53:21 字数 202 浏览 4 评论 0原文

在此处输入图像描述

大家好,我需要我的日期选择器可以有美国时间表年、月、日,因为它以拉丁时间显示,我该如何配置它。

我还需要我的日期选择器像这样显示 2022-03-02 并且不显示 2022/03/02 你能帮我吗?

enter image description here

Hello to all the community, I need that my datepicker can have the american timetable year, month, day because it appears in latin time, how can I configure that.

I also need that my datepicker shows like this
2022-03-02 and not to show 2022/03/02 can you help me?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

绝不服输 2025-01-18 03:53:22

在 Angular Material 文档中,您可以在国际化部分了解如何配置日期选择器: https: //material.angular.io/components/datepicker/overview#internationalization

另请参阅 MomentDateModule 格式部分:

您可以从此处记录的解析格式中进行选择:
https://momentjs.com/docs/#/parsing/string-format/< /a>

In the Angular Material documentation you can see how to configure the datepicker, at internationalization section: https://material.angular.io/components/datepicker/overview#internationalization

See also MomentDateModule formats section:

You can pick from the parse formats documented here:
https://momentjs.com/docs/#/parsing/string-format/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文