ciao a tutti
con questa funzione al click su un giorno qualunque del calendario (dataChooser) trovo un'intervallo di giorni,
questo è quello che vedo nel trace
codice:
DATA INIZIO PERMANENZA - 07/06/2005 - ULTIMO GIORNO DI PERMANENZA - 07/06/2005 - NUMERO DI GIORNI 1
adesso come posso rendere non più selezionabili quei giorni??
sto studiando la funzione disabledRanges ma non riesco ad applicarla al codice seguente
codice:
var tracer = new Object();
tracer.change = function(evt)
{
var d = evt.target.selectedDate;
var data1 = dateAdd(evt.target.selectedDate, 0);
var data2 = dateAdd(evt.target.selectedDate, myStepper.value-1);
var selezione = "DATA INIZIO PERMANENZA - " + data1 + " - ULTIMO GIORNO DI PERMANENZA - " + data2 + " - NUMERO DI GIORNI "+myStepper.value;
trace(selezione);
_root.sel.text = selezione;
};
myDC.addEventListener("change", tracer);
function dateAdd(givenDate, days)
{
var newDate = new Date(givenDate.getFullYear(), givenDate.getMonth(), givenDate.getDate() + days);
var dd = newDate.getDate();
if (dd < 10) dd = "0" + dd;
var mm = newDate.getMonth() + 1;
if (mm < 10) mm = "0" + mm;
var rDate = dd + "/" + mm + "/" + newDate.getFullYear();
return rDate;
}
mi dareste una mano
Grazie mille