This would of course only be useful as a check that could be performed when submitting the form, to determine if the date is valid, and if it isn't, show an error then, and make the user go back to fix it. This would be fine IMHO.

To prevent the user from selecting an invalid date in the first place would involve a pretty complicated JavaScript and will most likely just annoy the user anyway: What if "February 28" is currently selected, and she wants to select "January 31", but tries to do so by changing the day select menu first, and then the month? A JavaScript that says "Beep: Invalid date!" as soon as she's got February 31 selected is just going to tick her off. And leap years are a PITA too.

Disallow choosing an invalid date - In this case use a Javascript calendar control, I would also keep the server side checkdate() validation. If Javascript is disabled, then we can fall back to our current date entry interface + checkdate() validation.