Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
179
rated 0 times [  184] [ 5]  / answers: 1 / hits: 47318  / 11 Years ago, wed, april 10, 2013, 12:00:00

I visited Eyecon and downloaded the datepicker. I got three folders. 'css', 'js' and 'less'. I have included the bootstrap-datepicker.js and the latest jquery.js and linked the .css in the head:



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


As one can see, I'm already working with the bootstrap library and have therefore also included that.



My question now is: how do I implement and call the date picker function?


More From » jquery

 Answers
135

$('element').datepicker(); where element is some class, id etc.



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



HTML



<input type=text class=datepicker>


jQuery



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

[#78981] Tuesday, April 9, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
irvingjamieb

Total Points: 743
Total Questions: 113
Total Answers: 128

Location: Suriname
Member since Sun, Jun 13, 2021
3 Years ago
;