secretsquirrel
Programmer
hi!
i've got three dropdowns which represent a date - one for the date, one for the month and one for the year. problem is i need to force people to select a friday!
i'm creating a date object from these 3 fields and then i'm using getDay() to find out which day of the week the user has selected.
this is where i'm getting stuck. if the user selects 23/03/2006 (a thursday), i need the date dropdown to automatically change to 24 (the nearest friday). can anyone suggest a way to do this? i just can't think of a logical way to do it.
many thanks,
ss...
i've got three dropdowns which represent a date - one for the date, one for the month and one for the year. problem is i need to force people to select a friday!
i'm creating a date object from these 3 fields and then i'm using getDay() to find out which day of the week the user has selected.
this is where i'm getting stuck. if the user selects 23/03/2006 (a thursday), i need the date dropdown to automatically change to 24 (the nearest friday). can anyone suggest a way to do this? i just can't think of a logical way to do it.
many thanks,
ss...