jQuery DatePicker适用于除Firefox之外的所有浏览器

时间:2015-02-26 19:19:52

标签: javascript jquery firefox datepicker

我有一个jquery datepicker,除了firefox之外,适用于所有浏览器。适用于IE,Chrome,但不适用于Firefox。有没有人知道为什么这不起作用以及解决方案可能是什么。

代码:

<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/redmond/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" type="text/javascript"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js" type="text/javascript"></


<asp:TextBox ID="firstDate" name="" runat="server" CssClass="fields" ClientIDMode="Static"></asp:TextBox>
<asp:TextBox ID="secondDate" name="" runat="server" CssClass="fields" ClientIDMode="Static"></asp:TextBox>

$(function () {
        $("[id$=firstDate").datepicker({ dateFormat: 'yy-mm-dd' });
        $("[id$=secondDate").datepicker({ dateFormat: 'yy-mm-dd' }).bind("change", function () {
            var minValue = $(this).val();
            minValue = $.datepicker.parseDate("yy-mm-dd", minValue);
            minValue.setDate(minValue.getDate() + 1);
            $("[id$=firstDate").datepicker("option", "minDate", minValue);
        })
    });

0 个答案:

没有答案
相关问题