I recently started using jQuery and the Datepicker with an application
with the help of http://railscasts.com/episodes/213-calendars I got the
datepicker working on a text_field containing a date.
Problem however is when we edit a model. Since a text_field shows the
database value for a field by default, it displays the date as
'2011-05-24'. When we open te datepicker on this field it defaults to
'today' since it cant read the current value of the field.
Picking a date will display it in the format specified of datepicker,
but saving is no problem. I guess Rails is smart enough to figure it out
between the I18n.
My question is, how can I make sure my date is displayed in the format I
want it to be in the text_field of a form when editting.