Forum: Ruby on Rails How can I make date_select return to default value?

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.
jko170 (Guest)
on 2007-03-25 13:37
(Received via mailing list)
I have an _edit and _new partial that has the same text fields. When I
edit an object via ajax by rendering the edit partial, the date_select
becomes the objects date. After the object is saved (updated) the _new
partial replaces the edit partial and the date_select date is Still of
the previous object. I would like the date_select to return to todays
date when the _new partial is rendered. It does it of course when I
refresh the page, but not with ajax. Any pointers?
jko170 (Guest)
on 2007-03-25 23:19
(Received via mailing list)
This is what I'm using to clear one of the text fields:
page << "$('payment_amount').value = ''"

How can I "clear" the date select to return to today's date?
This topic is locked and can not be replied to.