Javascript - Date selector

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
RedRasper
Forum Commoner
Posts: 48
Joined: Thu Apr 24, 2003 6:36 am

Javascript - Date selector

Post 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
cirox
Forum Newbie
Posts: 4
Joined: Fri May 16, 2003 4:11 pm

Post 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.
RedRasper
Forum Commoner
Posts: 48
Joined: Thu Apr 24, 2003 6:36 am

Post 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
Post Reply