更改 Datetimepicker 中的日期格式
我需要更改以下代码以更改以下 javascript 中 datetimepicker 的日期格式:
目前它显示为 dd/mm/yyyy hh:mm:ss
但我想要它日/月/年
Where i need to change in the below code to change date format for datetimepicker in the following javascript:
Curently its show as dd/mm/yyyy hh:mm:ss
But i want it to be dd/mm/yyyy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以在调用 datetimepicker 控件时设置格式,而不是在 JQuery 库中进行更改。
如果有您只想在 lib 中执行此操作,请参阅这一行要更改
您需要将此值设置为您想要的任何值。即
日期格式:'dd/mm/yyyy'
Rather than changing in JQuery lib you can set the format while you call the datetimepicker control.
If at all you want to do it in lib only then See this line to change
You need to set this value to whatever you want. i.e.
dateFormat: 'dd/mm/yyyy'
描述
您可以使用选项
dateformat
更改标准 jQuery UI DatePicker 中的日期格式。您不需要更改插件。
示例
更多信息
Description
You can change the date format in the standard jQuery UI DatePicker using the option
dateformat
.You dont need to change the plugin.
Sample
More Information