Re: [Rails] Date Parsing Puzzlement
On 12 July 2011 07:11, Sayuj Othayoth <sayujothayoth@gmail.com> wrote:
> On Tue, Jul 12, 2011 at 6:45 AM, Leigh Daniels <leighdaniels42@gmail.com>
> wrote:
>> When I enter a Start Date in the text field as "07/11/2011" it gets stored
>> in the database as "2011-11-07" instead of "2011-07-11".
>
> your input format is DD/MM/YYYY. change this to MM/DD/YYYY.
Or better yet, "11 July 2011" - this makes it unambiguous. If you're
expecting users to type in dates in a certain format without making
mistakes, you're setting yourself up for lots of problems.
I'd also suggest using a date-select JS plugin to make it very easy
for your users to select the right date.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home