简体   繁体   中英

Calendar in ASP Classic

I'm trying to create a page in ASP Classic that uses the jquery calendar. I tried following several tutorials from the internet but could not. Below is the code I developed. Someone tell me what is wrong?

Below is the source code I'm developing:

<!--#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>

assuming dateinput() is a function that creates the datepicker- instead of

 $(":date").dateinput();

try

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

and make sure you put it after the DOM loaded under $(function(){ ... });

The soluction for my problem was:

<!--#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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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