Page 1 of 1

Javascript - Date selector

Posted: Mon May 12, 2003 5:30 am
by RedRasper
Hello, I womdered if anyone might have some advice.

At the moment I have some code (borrowed off someone else and modified a bit) that allows the user to select a start and end date via combo boxes.

What I want to be able to do is restrict the starting date, so that the user only sees the dates from the restricted start date onwards.

If someone could point me towards a way of starting a selection from a restricted date I would appreciate it.

Cheers

Posted: Fri May 16, 2003 4:40 pm
by cirox
If iI understand the problem right, try making an array of the dates you don't like and check the date against the array before outputing. If the date isn't one you like, don't echo it. else, echo it. Simple enough, but I somehow think that this isn't exactly the problem.

Posted: Mon May 19, 2003 3:07 am
by RedRasper
Thanks, thats almost what I've done now. (Actually it was a php solution) Basically as it was a retricted range of dates, I stored them all in an array, then just outputted them into combo box's. (3, a day one, a month one and a year one). Was quite pleased with the result in the end!


Cheers for your reply,

RedRasper