Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

javascript date dropdown

Options
  • 12-08-2005 1:52pm
    #1
    Registered Users Posts: 109 ✭✭


    Hi,
    I'm trying build a form that accepts date input from 3 fields, day, month, year. I'm doing this instead having something like a popup calendar that populates a blank field. (Any developer will tell you why this is a pain in the arse).

    I've come across loads of scripts that list the days, (1 - 31), months and a range of years. The problem is that most of these do not take into account that there aren't 31 days in every month. Some others use ASP and the like to do a database query to return valid days for the month and then re-populate the dropdown with the right amount of days, which seems very messy and slow.

    Another popular way to do it seems to be to allow users to select an invalid date, use something like checkdate() in php to check if it's valid or not, then tell the user they've selected an invalid date, go back and select another one...

    ...which is also crap.

    So I was wondering if anyone had seen one that will do it client-side? (My javascript isn't good enough to write it myself). I've been googling for an hour without success.

    Thanks,
    Paul


Comments

Advertisement