Cały problem polega na tym że, kalendarz jest "ładowany" w onLoad, i nie wiem jak mam ustawić ndExample1.DateChooser.setAllowedDays(['1', '3', '5']), po pobraniu listy dni.
Próbowałem dodać za pomocą oddzielnego skyptu w divie "c" ale to nie działa....
są to moje pierwsze działnia z js więc mogłem coś pokręcić, bardzo proszę o jakiekolwiek wskazówki
kalendarz: http://yellow5.us/projects/datechooser/
Kod
events.add(window, 'load', WindowLoad);
function WindowLoad()
{
var ndExample1 = document.getElementById('c');
ndExample1.DateChooser = new DateChooser();
// Check if the browser has fully loaded the DateChooser object, and supports it.
if (!ndExample1.DateChooser.display)
{
return false;
}
ndExample1.DateChooser.setUpdateFunction(FunctionEx1);
document.getElementById('datelinkex1').onclick = ndExample1.DateChooser.display;
return true;
}
function FunctionEx1(objDate)
{
// objDate is a plain old Date object, with the getPHPDate() property added on.
document.getElementById('dateinputex1').value = objDate.getPHPDate('F jS, Y');
return true;
}
function WindowLoad()
{
var ndExample1 = document.getElementById('c');
ndExample1.DateChooser = new DateChooser();
// Check if the browser has fully loaded the DateChooser object, and supports it.
if (!ndExample1.DateChooser.display)
{
return false;
}
ndExample1.DateChooser.setUpdateFunction(FunctionEx1);
document.getElementById('datelinkex1').onclick = ndExample1.DateChooser.display;
return true;
}
function FunctionEx1(objDate)
{
// objDate is a plain old Date object, with the getPHPDate() property added on.
document.getElementById('dateinputex1').value = objDate.getPHPDate('F jS, Y');
return true;
}