Jquery日期选择器给出格式错误消息:dd / mm / yyyy [英] Jquery date picker give error message with format : dd/mm/yyyy

查看:103
本文介绍了Jquery日期选择器给出格式错误消息:dd / mm / yyyy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人使用en-GB格式dd / mm / yyyyy在他的mvc5 web应用程序中使用jquery日期选择器?如果你真的使用那么请关心回复。我已经谷歌了,在我面前发现这么多人问同样的问题并得到了不同类型的答案。有些答案适用于某人,同样的答案对其他人无效。如果你真的不使用它并且不知道问题就忽略它。



我尝试了什么:



谷歌它找到了一些建议覆盖jquery日期验证的解决方案。但没有任何作用,我正在寻找简单的解决方案,而不是覆盖jquery验证。

解决方案



尝试下面的代码片段代码。


(#ControlName)。datepicker({dateFormat:'dd / MM / yyyy'});



希望这会有所帮助。


这里是Jquery UI的链接..可能你可能尝试过这个...



Datepicker Widget | jQuery UI API文档 [ ^ ]

Is there any one use jquery date picker in his mvc5 web application using en-GB format "dd/mm/yyyyy"? If you really use then please care to reply. I already Google and found so many people before me ask same question and got different type of answers. Some answers works for someone and same answer not works for others. If you really not use it and have no idea about the problem just ignore it.

What I have tried:

Google it found some solution where they suggest to override jquery date validation. But nothing works and I am looking for simple solution without override the jquery validation.

解决方案

Hi,
Try the following code snippet within your code .


("#ControlName").datepicker({ dateFormat: 'dd/MM/yyyy'});

Hoping this would be helpful.


here the link for Jquery UI.. May be you might have tried and searched on this...

Datepicker Widget | jQuery UI API Documentation[^]


这篇关于Jquery日期选择器给出格式错误消息:dd / mm / yyyy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆