Forum: Ruby on Rails date_select validate all fields selected

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
_thief_ (Guest)
on 2009-05-27 01:15
(Received via mailing list)

date_select seems to behave rather strangely if :prompt => true
or :empty => true and the user does not select all fields.

It seems that by the time the birth_date field gets to validation, its
filled with a Date object that has defaults set for empty fields. eg
If a year is selected but month and day are not, then month and day
are set to january 1st. This is really not intuitive but I'm still new
to rails (made the move from CakePHP at last!) - maybe I'm doing
something wrong.

Is there a best practice here that I don't know about?

This topic is locked and can not be replied to.