Quote:<!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>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery beforeShowDay Setting</title>
<link type="text/css" href="jQuery/css/jquery-ui-1.8.9.custom.css" rel="stylesheet" />
<script type="text/javascript" src="jQuery/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="jQuery/jquery-ui-1.8.9.custom.min.js"></script>
<script type="text/javascript">
var options = {
dateFormat: 'dd/mm/yy',
changeYear: true,
changeMonth: true,
buttonImageOnly: true,
buttonText: 'คลิกเลือกวันที่',
showOn: 'button',
buttonImage: 'images/date_picker.gif',
duration: 'fast',
beforeShowDay: function(date){ return [date.getDay() == 3,""]}
};
$(function(){
$('.datepicker').datepicker(options);
$("img[src$='images/date_picker.gif']").mouseover(function() {$(this).css('cursor','pointer');});
});
</script>
<style type="text/css">
.ui-datepicker-div, .ui-datepicker-inline, #ui-datepicker-div {font:10px Tahoma, Geneva, sans-serif;}
</style>
</head>
<body>
<input type="text" name="textfield" class="datepicker" />
</body>
</html>