Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试更改默认日期选择器中的日期格式(使用 Wordpress 中的 CF7 插件),我假设它只使用基本的 JQ UI 日期选择器。但我不知道我是否可以手动将 jquery 应用于它?我只需要将日期格式更改为 yyyy/mm/dd
谢谢 :)
根据文档,您可以更改 jQuery UI datepicker 中的日期格式,例如
dateFormat 解析和显示日期的格式。有关可能格式的完整列表,请参阅 formatDate 函数。
dateFormat
这里记得
yy - year (four digit)
所以最后
$("#date").datepicker({ dateFormat: "yy/mm/dd" });