Invalid Date - Null Values

8 views
Skip to first unread message

Keaja

unread,
Oct 9, 2007, 12:45:44 PM10/9/07
to Ruby on Rails: DHTML Calendar
If my date picker is empty or the user has not selected anything, I
get the following error. How can I handle empty/null values?

ArgumentError in YikesController#index

invalid date

Kanniball

unread,
Oct 11, 2007, 12:39:37 PM10/11/07
to dhtml-c...@googlegroups.com
You can add some validation to your model, to check if the user has filled the date.

Jason Winn

unread,
Oct 15, 2007, 1:31:45 PM10/15/07
to dhtml-c...@googlegroups.com
Thanks Kanniball. That is a good idea except that I want the user to be able to leave the date blank. Is there way to allow null dates?

Keaja

unread,
Oct 15, 2007, 1:32:23 PM10/15/07
to Ruby on Rails: DHTML Calendar
Thanks Kanniball. That is a good idea except that I want the user to
be able to leave the date blank. Is there way to allow null dates?

On Oct 11, 9:39 am, Kanniball <o.kannibal...@gmail.com> wrote:
> You can add some validation to your model, to check if the user has filled
> the date.
>

Kanniball

unread,
Oct 16, 2007, 5:13:29 AM10/16/07
to dhtml-c...@googlegroups.com
You are allowing null values in the database?

Jason Winn

unread,
Oct 22, 2007, 1:42:44 PM10/22/07
to dhtml-c...@googlegroups.com
Hi Kanniball,

Yes I would like to allow null values in my date columns. Not sure why I am getting that error when I do not have any validation and null's are allowed
Reply all
Reply to author
Forward
0 new messages