简体   繁体   English

jquery.min.js版本冲突在asp.net网站中不起作用

[英]jquery.min.js version conflict not working in asp.net website

I have an asp.net application. 我有一个asp.net应用程序。 Previously the application was using jquery-1.7.2.min.js version. 以前,该应用程序使用的是jquery-1.7.2.min.js版本。 But I had to upgrade it to jquery-2.1.3.min.js in order to make kendo charts work. 但是我必须将其升级到jquery-2.1.3.min.js才能使kendo图表正常工作。

But now, a textbox with fieldType 'date' stopped popping up calendar with the new version. 但是现在,具有fieldType'date'的文本框停止弹出带有新版本的日历。

Here is my textbox, 这是我的文字框

<asp:TextBox ID="txtDateFrom" fieldtype='date' CssClass="selectstyle" Width="150px" runat="server" MaxLength="10"></asp:TextBox>

$(function () {
        $('input[fieldtype="date"]').datepicker({ firstDay: 1
                                                , changeMonth: true
                                                , changeYear: true
        });
    });

Now the problem is, if I keep the old version of jQuery, kendo charts do not work and if I keep the new version of jQuery, above JavaScript fails. 现在的问题是,如果我保留旧版本的jQuery,则剑道图表将不起作用,并且如果我保留新版本的jQuery,则JavaScript失败。

Is there any way, I can update jquery-2.1.3.min.js to consider the above script for fieldtype? 有什么办法,我可以更新jquery-2.1.3.min.js以将上述脚本用于fieldtype吗?

jQuery calendar control belongs to a different library called jQuery-ui . jQuery日历控件属于另一个名为jQuery-ui库。 You need to upgrade it as well, the same way you upgraded the old jQuery library to a newer version. 您还需要升级它,就像将旧jQuery库升级到新版本一样。 You can use CDN for that or just download the needed version directly from the jQueryUI website. 您可以使用CDN或直接从jQueryUI网站下载所需的版本。

Remember, that versions doesn't have to be the same because they are two different libraries. 请记住,版本不必相同,因为它们是两个不同的库。 I think jQuery-ui-1.11.3.js should work for you. 我认为jQuery-ui-1.11.3.js应该适合您。

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

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