简体   繁体   English

JQuery DataPicker在Internet Explorer 7中不起作用

[英]JQuery DataPicker not working in Internet Explorer 7

I am using the JQuery DatePicker for selecting date in text boxes. 我正在使用JQuery DatePicker在文本框中选择日期。 The code i am using is given below, 我正在使用的代码如下所示,

<script type="text/javascript">
    $(document).ready(function () {
        $('#date').datepicker({
            dateFormat: 'dd-mm-yy',
            showOtherMonths: true,
            changeMonth: true,
            changeYear: true,
            showAnim: "fold",
            dayNamesMin: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
            constrainInput: true,
            firstDay: 1
        });
    });
</script>

It works perfectly in Chrome and IE versions 9 and above. 它在Chrome和IE 9及更高版本中完美运行。 But its not working in IE versions 7 and 8. Then i also tried the following like but still the same, it works in IE 9 and above but not in IE 7 and 8. 但是它在IE 7和8版本中不起作用。然后我也尝试了以下类似但仍相同的方法,它在IE 9及更高版本中有效,但在IE 7和8中无效。

JQuery UI DataPicker doesnt work in IE 7 jQuery UI DataPicker在IE 7中不起作用

Can someone tell me what i am doing wrong and how to do this? 有人可以告诉我我做错了什么以及如何做? I am using Visual Studio 2010 and the JQuery script i am referring is as below, 我使用的是Visual Studio 2010,我要引用的JQuery脚本如下,

<script type="text/javascript" src="Scripts/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="Scripts/jquery-ui.js"></script>

The 2.x branch of jQuery does not support IE 8 and below, from the documentation 的jQuery的2.x的分支不支持IE 8及以下,从文档

The 1.x branch includes support for IE 6/7/8 and the 2.x branch does not. 1.x分支包括对IE 6/7/8的支持,而2.x分支则不支持。

You'll have to swap to the 1.x branch 您必须交换到1.x分支

Also note that current versions of jQuery UI only supports IE 11 officially 另请注意, 当前版本的jQuery UI仅正式支持IE 11

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM