<html>
<head>
<script type="text/javascript">
$(function() {
$('#date').datepicker();
});
$(function() {
var availableTags = ["Christmas Day","etc"];
$("#tags").autocomplete({
source: availableTags
});
});
$('#date').change( function() {
if ($(this).val().substring(0, 5) === '12/25') {
$('#desc).val('Christmas');
} else {
$('#tags').val('');
}
});
</script>
<body>
<DIV class="ui-widget">Date: <INPUT TYPE="TEXT" name="xx"
property="xx" id="date" />
</P>
<input type="text" id="desc" name="desc" />
</DIV>
</body>
</html>
[/code]