www.un.org/Depts/DGACM/index_spanish.htm Hey Guys,
i have a big problem with my jQuery Datepicker Script. I use jQuery 1.4.2 and jQuery Ui 1.8.
Background: I have a reservation calendar with a fromDate and toDate and all Dates which are already reserved are disabled. The Dates come from Database by AJAX Call.
Problem: Everything works fine in Firefox - but IE 7/8 does not disable Dates execept for the actual month. I do not get any Error Message in IE 7/8!
我的守则如下:
www.un.org/Depts/DGACM/index_spanish.htm 第一,AJAX 要求获得日期:
var navDays = (function () {
var val = null;
$.ajax({
async : false,
global : false,
url : WEG_URL+ rsv_avdates.php ,
success : function (data) {
val = data;
}
});
return val;
})();
var disDays = navDays.split( | );
In disDays i have nowdates such as 2010-01-01 , 2010-01-02 ....
www.un.org/Depts/DGACM/index_spanish.htm 在这里,我是站不住脚的。 日期:
function disabledDays(date) {
var m = date.getMonth();
var d = date.getDate();
var y = date.getFullYear();
for (var i = 0; i <= disDays.length-1; i++) {
var myDate = new Date(disDays[i]);
if ((m == (myDate.getMonth())) && (d == (myDate.getDate())) && (y == (myDate.getFullYear())))
{
return [false];
}
}
return [true];
}
,最后是我的日皮克尔呼吁:。
$( #fromdate, #todate ).datepicker(
{
showOn: "both",
buttonImage: images/calender.gif ,
buttonImageOnly: true,
beforeShowDay: disabledDays,
dateFormat: "dd.mm.y",
firstDay: 1,
changeFirstDay: false
});
你们是否想到,为什么所有工作都是在IE 7/8中精炼的:Safari、Shaw、...、但NOT?
感谢大家。
Sascha