Ok, quindi sono nuovo nell'usare framework e librerie js e sto cercando di usarlo bootstrap e bootstrap datepicker per un modulo e non ho idea se ho l'ordine dei file corretto ma i link è come sono impostati i file, e so molto poco di javascript, praticamente tutto quello che ho in codice è php ma ho bisogno di questo per un modulo.Come usare bootstrap datepicker
Ecco il mio modulo di prova per la datepicker bootstrap:
<!DOCTYPE html>
<html>
<head>
<title>Testing</title>
<meta charset="utf-8">
<link rel="stylesheet" href="_css/datepicker.css">
<link rel="stylesheet" href="_css/bootstrap.css">
<link rel="stylesheet" href="_css/bootstrap-responsive.css">
<script type="text/javascript" src="datepicker/bootstrap-datepicker.js"></script>
</head>
<body>
<center>
<h1>BootStrap Datepicker</h1>
<form>
<div class="well span12 main">
<input type="text" id="dp1" class="span2 datepicker" placeholder="Date..."
name="date"> <br>
</div>
<input type="submit" value="Search" class="btn">
</form>
</center>
<!-- JAVAscript ----------------------------------------------------------------->
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="_js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="_js/bootstrap.js"></script>
</body>
</html>
Che cosa sto facendo di sbagliato?
hai un tag di script 'bootstrap-datepicker.js' in testa, anche bootstrap.js dovrebbe essere caricato prima del plugin e devi inizializzare il plugin sul tuo elemento, non funzionerà solo perché hai impostato la classe Datepicker –