Struggling with onchange for JQuery Datetime plugin:
http://plugins.jquery.com/project/datetime
I am using the following code.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="/charts/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src='/charts/js/jquery-ui-1.8.6.custom.min.js'></script>
<script type="text/javascript" src="/charts/js/jquery.ui.datetime.min.js"></script>
<link rel="Stylesheet" href="/charts/css/redmond/jquery-ui-1.8.6.custom.css" />
<link rel="Stylesheet" href="/charts/css/jquery.ui.datetime.css" type="text/css" />
<script type="text/javascript">
$(function(){
$('#endSelect').datetime({ value: '2011-01-01 13:00', minDate: '2011-01-01 01:00', maxDate: '2011-12-31 12:00'});
});
jQuery('#endSelect').change(function() {
alert("hi");
});
</script>
</head>
<body>
<input id="endSelect" class="grid-3" />
</body>
</html>
I have setup a test site at here where you can test the code yourself.
i wrote datetime. it uses the widget factory. events in there arent fired like normal jquery events by design. check out the docs at http://wiki.jqueryui.com/w/page/12138135/Widget%20factory. there are two ways for you to accomplish what you are trying to do.
hope that helps. R