0

Desenvolvi uma aplicação que utiliza 3 bibliotecas jquery-1.11.1.min.js, bootstrap.min.js, bootstrap-datepicker.js, esta aplicação funciona usando as bibliotecas adquiridas online (src="htt://") porem quando adiciono a referencia a estas mesmas bibliotecas que possuo no pc o datepicker não funciona (já chequei os diretorios) OBS: são as mesmas versões

codigo html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<head>      
    <link rel="stylesheet" type="text/css" href="../CSS/StyleSheet.css"/>

    <link rel="stylesheet" type="text/css" href="../Bootstrap/css/bootstrap.css" media="screen" />

    <script src="../FullPage/vendors/jquery.easings.min.js"></script>
    <script type="text/javascript" src="../FullPage/jquery.fullPage.js"></script>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
</head>
<body>
    <div class="panel panel-default col-md-8 col-md-offset-2">
        <div class="panel-heading">
            <h3 class="panel-title span7 text-center"><span class="title">Create Account</span></h3>
        </div>
        <div class="panel-body">
            <form class="form-horizontal">
                <div class="col-md-6">
                    <div class="form-group">
                        <label for="input_email" class="control-label col-md-3">Your Email (login)</label>
                        <div class="col-md-9">
                            <input type="email" class="form-control" id="input_email" placeholder="Email">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input_password" class="control-label col-md-3">Password</label>
                        <div class="col-md-9">
                            <input type="password" class="form-control" id="input_password" placeholder="Password">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input_date" class="control-label col-md-3">Birthdate</label>
                        <div class="col-md-9 input-group date">
                            <input type="text" class="form-control" id="input_date"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
                        </div>
                    </div>
                </div>
                <div class="form-group text-center">
                    <div class="col-md-6 col-md-offset-3">
                        <button type="reset" class="btn btn-danger">Reset</button>
                        <button type="submit" class="btn btn-primary">Create Account</button>
                    </div>
                </div>
            </form>
        </div>
        <div class="panel-footer span7 text-center"><a href="#">Back to Site</a></div>
    </div>

    <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
    <script src="//netdna.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
    <script src="http://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.3.0/js/bootstrap-datepicker.js"></script>

    <!--<script type="text/javascript" src="../Bootstrap/js/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="../Bootstrap/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../datepicker/js/bootstrap-datepicker.js"></script>-->
    <script>
        $('.input-group.date').datepicker({
            format: "yyyy/mm/dd",
            startDate: "2012-01-01",
            endDate: "2015-01-01",
            todayBtn: "linked",
            autoclose: true,
            todayHighlight: true
        });
    </script>   
</body>

0

1 Resposta 1

0

Tens de colocar as bibliotecas javascript: Jquery, bootstrap e datepicker (na mesma ordem) na tag head, e mudar os endereços relativos para o endereço localhost/.../.../jquery (no meu projeto funcionou desta forma)

Você deve fazer log-in para responder a esta pergunta.

Esta não é a resposta que você está procurando? Pesquise outras perguntas com a tag .