14

Odwiedziłem Eyecon i pobrałem datepicker. Mam trzy foldery. "css", "js" i "less". Mam włączone bootstrap-datepicker.js i najnowsze jquery.js i powiązał .css w głowę:Jak zaimplementować i użyć programu do ładowania danych eyecon-datepicker?

<!DOCTYPE> 
<html> 
    <head> 
     <meta charset="utf-8"> 
     <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
     <title>Test</title> 
     <link rel="stylesheet" type="text/css" href="../css/datepicker.css"> 
     <link rel="stylesheet" type="text/css" href="../css/bootstrap.css"> 
     <link rel="stylesheet" type="text/css" href="../css/bootstrap-responsive.css"> 


    </head> 

    <body> 
     <div class="well"> 
      <!--What should I enter here and where/how do I call the function?--> 
     </div> 

     <script type="text/javascript" src="../js/jquery.js"></script> 
     <script type="text/javascript" src="../js/bootstrap-datepicker.js"></script> 
     <script type="text/javascript" src="../js/bootstrap.js"></script> 
    </body> 
</html> 

Jak widać, jestem już pracuje z bootstrap biblioteki i dlatego także że.

Moje pytanie brzmi teraz: jak zaimplementować funkcję wyboru daty i zadzwonić do niej?

+0

A co to jest, bez tego w folderze "mniej"? :) –

+5

[LESS to magia;)] (http://lesscss.org/) –

+0

aha, który wygląda niesamowicie :) –

Odpowiedz

17

$('element').datepicker(); gdzie element pewne klasy, id itp

http://jsfiddle.net/6kk3k/1/

HTML

<input type="text" class="datepicker"> 

jQuery

$('.datepicker').datepicker();