\Yezervasyon\Yezervasyon\Scripts\Takvim\mainScript.js
Return Back
var tarih = new Date();
var rezerveTarihler = [];
var mdp_demo = $('#mdp-demo');
var table = document.getElementById("ogrenciTablo");
var gecerliTarih = document.getElementById("gecerliTarih");
var minDate = 1;
if (table.rows.length > 1) {
for (var satir = 1, n = table.rows.length; satir < n; satir++) {
var gun = table.rows[satir].cells[0].innerHTML.split(".")[0];
rezerveTarihler.push(tarih.setDate(gun));
}
if (parseInt(gecerliTarih.innerText) >= 14) {
minDate = 2;
}
mdp_demo.multiDatesPicker({
dateFormat: "d.m.yy",
separator: " -- ",
beforeShowDay: $.datepicker.noWeekends,
minDate: minDate, // today
maxDate: 30,
addDisabledDates: rezerveTarihler,
altField: '#seciliTarihler'
});
} else if (parseInt(gecerliTarih.innerText) >= 14) {
minDate = 2;
}
mdp_demo.multiDatesPicker({
dateFormat: "d.m.yy",
separator: " -- ",
beforeShowDay: $.datepicker.noWeekends,
minDate: minDate, // today
maxDate: 30,
altField: '#seciliTarihler'
});
var rezerveTarihler = [];
var mdp_demo = $('#mdp-demo');
var table = document.getElementById("ogrenciTablo");
var gecerliTarih = document.getElementById("gecerliTarih");
var minDate = 1;
if (table.rows.length > 1) {
for (var satir = 1, n = table.rows.length; satir < n; satir++) {
var gun = table.rows[satir].cells[0].innerHTML.split(".")[0];
rezerveTarihler.push(tarih.setDate(gun));
}
if (parseInt(gecerliTarih.innerText) >= 14) {
minDate = 2;
}
mdp_demo.multiDatesPicker({
dateFormat: "d.m.yy",
separator: " -- ",
beforeShowDay: $.datepicker.noWeekends,
minDate: minDate, // today
maxDate: 30,
addDisabledDates: rezerveTarihler,
altField: '#seciliTarihler'
});
} else if (parseInt(gecerliTarih.innerText) >= 14) {
minDate = 2;
}
mdp_demo.multiDatesPicker({
dateFormat: "d.m.yy",
separator: " -- ",
beforeShowDay: $.datepicker.noWeekends,
minDate: minDate, // today
maxDate: 30,
altField: '#seciliTarihler'
});