i need to add a date picker to my site(live score site) i need to change the fixtures depending on the selected date.
i have tried a lot of jquery datepickers but i always get the same problem which is :
i cant change the fixtures when i select a new date i tried jquery events (select , change, live ,…..) nothing work also i can not get the date picked from the text box to get the related fixtures?
this is a sample code for what i am working on (i cant even alert on change):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="zebra_datepicker.js"></script>
<link rel="stylesheet" href="zebra_datepicker.css" type="text/css">
<script>
$(document).ready(function() {
// assuming the controls you want to attach the plugin to
// have the "datepicker" class set
$('input.datepicker').Zebra_DatePicker();
});
$(".datepicker").change(function(){alert('basel')});
</script>
</head>
<body><input type="text" name="your_input" class="datepicker"/></body>
<footer></footer>
</html>
i hope to get an answered soon thx
jQueryUI overrides the change function, so you want to use the jQueryUI events, such as onSelect.
Of course all of this is in the documentation:
http://api.jqueryui.com/datepicker/#option-onSelect