0
我正在使用ajax工具包日曆擴展控件每次顯示僅選擇星期五
在日曆中,我只想顯示星期五我不想顯示其他日子。任何幫助深表感謝。
我試過了。
<script type="text/javascript">
function checkdate(txt) {
var seldate = document.getElementById("txtDate")
var selectedDate = new Date(seldate.value);
var today = new Date();
var weekday = new Array(7);
weekday[0] = "Sunday";
weekday[1] = "Monday";
weekday[2] = "Tuesday";
weekday[3] = "Wednesday";
weekday[4] = "Thursday";
weekday[5] = "Friday";
weekday[6] = "Saturday"
if (selectedDate != weekday[5]) {
alert('Select Friday only !');
var a = document.getElementById("txtDate");
a.value = " ";
} else {
if (selectedDate == weekday[5]) {
var a = document.getElementById("txtDate");
a.value = selectedDate;
}
}
}
</script>
<asp:TextBox ID="txtDate" Enabled="true" runat="server" Width="200px" onchange="checkdate(this);"></asp:TextBox>
<ajaxtK:CalendarExtender ID="calext" runat="server" TargetControlID="txtDate" ></ajaxtK:CalendarExtender>