<br><br><div class="gmail_quote">On 26 July 2011 17:43, John Winters <span dir="ltr"><<a href="mailto:john@sinodun.org.uk">john@sinodun.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 26/07/11 17:36, Matthew Rudy Jacobs wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Because I have some fairly naive users, and getting them to use a<br>
computer at all can be a bit of a struggle. Seriously - I have<br>
users whose tension levels go through the roof if even asked to sit<br>
at a keyboard. Asking them to adapt to a new date format is just<br>
too much.<br>
<br>
I suggest to use names of months, instead of month numbers then<br>
<br>
"20" + "September" + "2012"<br>
<br>
is unambiguous, and user-friendly, in america and the uk.<br>
</blockquote>
<br></div>
Yes, that's a nice idea, but it still leaves unanswered the question of how to get an existing date formatted like that in the text field.<br>
<br>
As far as I've been able to discover, Rails provides no facilities to control that formatting, and what you'll get in your field by default is the raw database format. Obviously there are lots of ways of overriding this, but what I've been trying to do is find the Correct Rails Way(TM) to achieve it.<br>
<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">The best I've come up with so far is the ":value => ..." way I detailed earlier. I'm surprised the framework doesn't provide anything better, but I'll keep looking for a while longer just in case.<div>
<div></div><div class="h5"><br></div></div></blockquote><div><br></div><div>Not necessarily better, but there are the date_select and time_select helpers. They give you a series of drop downs instead of a text field and Rails magically works out how to translate the 3 or 6 values they provide into a single date object. </div>
<div><br></div><div>Or you could embellish the text field with a JS calendar picker.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="h5">
<br>
Cheers,<br>
John<br>
______________________________<u></u>_________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org" target="_blank">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/<u></u>listinfo.cgi/chat-lrug.org</a><br>
</div></div></blockquote></div><br>