Hi again,
So I making a flash contact form for reservations. I dragged the DateField component onto the stage, gave it an instance name of rDate_txt and it works great in picking a date and sending to my php emailer. Its formatted like 10 Apr 2008.
Now, Im trying to calculate the day of the week based on the date. I can calculate todays date with…
myDate = new Date();
daytext = myDate.getDay();
switch (daytext)
{
case 0:
{
daytext = "SUNDAY";
break;
}
case 1:
{
daytext = "MONDAY";
break;
}
case 2:
{
daytext = "TUESDAY";
break;
}
case 3:
{
daytext = "WEDNESDAY";
break;
}
case 4:
{
daytext = "THURSDAY";
break;
}
case 5:
{
daytext = "FRIDAY";
break;
}
case 6:
{
daytext = "SATURDAY";
break;
}
} // End of switch
Can anyone help me get the date chosen from the DateField component?
Once I get the day of the week, I need to make a different ComboBox visible if its a Friday or Saturday. So I would think I need to set up an onchange listener?
Thanks In Advance!
Rich