29
rated 0 times
[
32]
[
3]
/ answers: 1 / hits: 33306
/ 12 Years ago, mon, march 19, 2012, 12:00:00
I'm creating a date range picker in jQuery and tie it to an input text field.
the code goes like this:
<!DOCTYPE html>
<html>
<head>
<link href=http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css rel=stylesheet type=text/css/>
<script src=http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js></script>
<script src=http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js></script>
<script>
$(document).ready(function() {
$(#datepicker).datepicker();
});
</script>
</head>
<body style=font-size:62.5%;>
<form action=sample.php method=post>
Start Date: <input type=text name=startdate id=datepicker/>
End Date: <input type=text name=enddate id=datepicker/>
<input type=submit />
</form>
</body>
</html>
Data seems to be working FOR the START DATE input text field. When I select the start date field, the calendar appears:
But when I click on the END DATE input text field, the calendar never appears. I need to select dates START and END by using that calendar.
Something must be wrong on my code. Can anyone tell me?
Thanks!
More From » jquery