ASP Classic中的日历

时间:2012-05-11 20:16:58

标签: javascript jquery html asp-classic

我正在尝试在ASP Classic中创建一个使用jquery日历的页面。我试过从互联网上学习几个教程但不能。以下是我开发的代码。有人告诉我出了什么问题?

以下是我正在开发的源代码:

<!--#include virtual = "/EcommerceNew/hidden/funcoes.asp"-->
<!--#include virtual = "/EcommerceNew/hidden/barra_progresso.asp"-->
<%
    Response.Buffer = true
    call Verificar_Login_Ativo()
    limite_excel            = 65000
%>
<html>
<head>
    <title></title>
    <script type="text/javascript" src="../../../javascript/jquery.tools.min.js"></script>
    <link href="../../stylesheets/style.css" rel="stylesheet" type="text/css">
    <link href="../../../stylesheets/calendario.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2>
            Relatório de vendas de jornais
        </h2>
    </div>
    <div class="linha">
        </ br> </ br>
    </div>
    <div class="linha">
        <div class="bloco_text">
            Data inicial
        </div>
        <div class="bloco_input">
            <input type="date" name="txtDataInicial">
        </div>
        <div class="bloco_text">
            Data Final
        </div>
        <div class="bloco_input">
            <input type="date" name="txtDataFinal">
        </div>
    </div>
    <div class="linha">
        </ br> </ br>
    </div>
    <div class="linha">
        <input name="Procurar" type="SUBMIT" class="btn" value="Consultar">
    </div>
    </form>
    <script type="text/javascript">
        $(":date").dateinput();
    </script>
</body>
</html>

2 个答案:

答案 0 :(得分:2)

假设dateinput()是一个创建datepicker而不是

的函数
 $(":date").dateinput();

 $("input[type='date']").dateinput();

并确保将其放在$(function(){ ... });

下加载的DOM之后

答案 1 :(得分:1)

我的问题的解决方案是:

<!--#include virtual = "/EcommerceNew/hidden/funcoes.asp"-->
<!--#include virtual = "/EcommerceNew/hidden/barra_progresso.asp"-->
<%
    Response.Buffer = true
    'Guilherme teste - retirar após a conclusão do trabalho
    'call Verificar_Login_Ativo()
    limite_excel            = 65000
%>
<html>
<head>
    <title></title>
    <!--stylesheets-->
    <link href="../../stylesheets/style.css" rel="stylesheet" type="text/css">
    <link type="text/css" rel="Stylesheet" href="../../stylesheets/jquery-ui.css" />
    <!--javascripts-->
    <script type="text/javascript" src="../../javascripts/jquery.min.js"></script>
    <script type="text/javascript" src="../../javascripts/jquery-ui.min.js"></script>
    <script type="text/javascript" src="../../javascripts/jquery.ui.datepicker-pt-BR.js"></script>

    <!-- Exemplo 
    <link type="text/css" rel="Stylesheet" href="http://ajax.microsoft.com/ajax/jquery.ui/1.8.6/themes/smoothness/jquery-ui.css" />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.ui/1.8.6/jquery-ui.min.js"></script> 
    <!-- Exemplo fim -->

    <!-- Formatar data -->
    <script type="text/javascript">
    $(function () {
        $("#datainicial").datepicker();
    });
    $(function () {
        $("#datafinal").datepicker();
    });
    </script>

    <!-- scripts que eram utilizados pela vpc-->
    <script src="../hidden/iframe.js"></script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2>
            Relatório de vendas de jornais
        </h2>
    </div>
    <div class="linha">
        <br> <br>
    </div>
    <div class="linha">
        <div class="bloco_text">
            Data inicial
        </div>
        <div class="bloco_input">
            <input id="datainicial" type="text" />
        </div>
        <div class="bloco_text">
            Data Final
        </div>
        <div class="bloco_input">
            <input id="datafinal" type="text" />
        </div>
    </div>
    <div class="linha">
        <br> <br>
    </div>
    <div class="linha">
        <input name="Consultar" type="SUBMIT" class="btn" value="Consultar">
    </div>
    </form>
</body>
</html>