hi
thx for all.
the reason why i asked is because some code i have used from the internet
was checking: params[:event][:from_date].empty? , but mine was always nil
(as above). after assigning the params to a new model and checking then
fixed it for me.
On Thu, Nov 20, 2014 at 11:30 AM, Matt
On Wednesday, 19 November 2014 17:40:50 UTC-5, der_tom wrote:
>
> hi,
>
> im kinda stuck...
>
> <%= form_for(@event) do |f| %>
>
> <%= f.label :from_date %>
> <%= date_select :event, :from_date %>
>
>
>
> .
>
> def create
> p params[:event].nil?
> p params[:event][:name]
> p par
You're using the f.label and date_select helpers. Try using f.date_select ?
On Wednesday, November 19, 2014 2:40:50 PM UTC-8, der_tom wrote:
>
> hi,
>
> im kinda stuck...
>
> <%= form_for(@event) do |f| %>
>
> <%= f.label :from_date %>
> <%= date_select :event, :from_date %>
>
>
>
>
thanks. that works. -aj
On Nov 16, 12:45 pm, Craig White wrote:
> On Nov 15, 2011, at 9:08 AM, AJ Chen wrote:
>
> > In my model, birthday is of type Date. The following date_select field
> > always displays the current day in the browser even though :birthday
> > has a different value. Any idea?
On Aug 23, 10:23 am, Frederick Cheung
wrote:
> On Aug 23, 2:51 pm, Fritz Trapper wrote:
>
> > Is there an equivalent for date_select to be used in a form_tag block?
>
> select_date
>
> Fred
>
>
>
> > --
> > Posted viahttp://www.ruby-forum.com/.- Hide quoted text -
>
> - Show quoted text -
That
On Aug 23, 2:51 pm, Fritz Trapper wrote:
> Is there an equivalent for date_select to be used in a form_tag block?
select_date
Fred
> --
> Posted viahttp://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post t
Hi,
Yes, actually I had an exact requirement a while ago and when I saw you
asking for the same thing, I thought it would be better to blog it down
so it can be easily accessible for everyone.
regards,
Sur
http://rubyonrailshacks.com
http://expressica.com
Sur Max wrote:
> Hi,
>
> Seems the
I see it now in Safari.
Thanks again. The tutorial was very clear and straight forward. Worked
very well.
Cam
On Jul 31, 2:25 pm, Sur Max wrote:
> Hi,
>
> Seems the color highlighting plugin is broken in Safari.
> Please see it in FireFox.
>
> regards,
> Surhttp://rubyonrailshacks.com
>
> Cam wr
Hi,
Seems the color highlighting plugin is broken in Safari.
Please see it in FireFox.
regards,
Sur
http://rubyonrailshacks.com
Cam wrote:
> Thanks for your reply and for the tutorial. The code is not showing on
> the page though.
> http://rubyonrailshacks.com/2010/07/how-to-modify-date_select-
Thanks for your reply and for the tutorial. The code is not showing on
the page though.
http://rubyonrailshacks.com/2010/07/how-to-modify-date_select-to-show-text-field-for-year/
Cheers,
Cam
On Jul 31, 12:11 am, Sur Max wrote:
> Hi,
>
> It is simple, but it's not straight forward.
> You just n
Hi,
It is simple, but it's not straight forward.
You just need to discard the year from select and add the proper name to
the text field for year.
You can refer it here for better example with code
http://rubyonrailshacks.com/2010/07/how-to-modify-date_select-to-show-text-field-for-year/
regard
+1, hit this nail right on today :(
On Feb 25, 7:27 pm, Stuart Corbishley wrote:
> I am aware that date selects params are supposed to supported by
> Searchlogic.
>
> But I'm battling to get them working.
>
> I am using one of the named_scopes that it makes, and it works perfectly
> in the consol
Alexis Mueller wrote:
> Without knowing more about your app and your models, I would ask what
> the :post refers to in your date_select.
>
> If I understand you correctly, you want to render a date select field
> for the 'birthdate' attribute. What model does this attribute belong
> to? Are you us
Without knowing more about your app and your models, I would ask what
the :post refers to in your date_select.
If I understand you correctly, you want to render a date select field
for the 'birthdate' attribute. What model does this attribute belong
to? Are you using the date_select as part of a f
On Aug 8, 9:41 pm, Lb2007 wrote:
> <%= f.date_select :start, {:order => [:day, :month, :year]}, {:id =>
> {:year => 'abc', :month => 'de', :day => 'xy'}} %>
> The code above nearly works; the right selectors are generated in the
> right order, however, the IDs of each selector are the same; sim
Jeba Momin wrote:
> Hi,
> I'm localizing my rails 2.2.2 application using i18n.
> In my form(view) I have:
> <%= date_select :range,:start_date,:order => [:month,:day,:year]%>
> In environment.rb I have:
> I18n.default_locale = 'en-US'
> and in en-US.rb its:
> I18n.backend.store_translations 'en-U
I don't know about date and time types.
Colin
2009/5/21 Tyler Knappe
>
> Colin Law wrote:
> > 2009/5/21 Tyler Knappe
> >
> >> >
> >>
> >
> > I may have to be corrected, but I don't think this is necessary. If the
> > db
> > column is datetime (as defined in the migration and schema.rb) then th
Colin Law wrote:
> 2009/5/21 Tyler Knappe
>
>> >
>>
>
> I may have to be corrected, but I don't think this is necessary. If the
> db
> column is datetime (as defined in the migration and schema.rb) then the
> value in a DateTime object should be written (and read) automatically in
> the
> ap
2009/5/21 Tyler Knappe
>
> WJSimacek wrote:
> > On May 21, 2:28�am, Colin Law wrote:
> >> If you save it in the database as a datetime then all should be well.
> �If
> >
> > Have you tried using the :db format?:
> >
> > Time.now.to_s(:db) # this forces the save to the db in
> > comp
WJSimacek wrote:
> On May 21, 2:28�am, Colin Law wrote:
>> If you save it in the database as a datetime then all should be well. �If
>
> Have you tried using the :db format?:
>
> Time.now.to_s(:db) # this forces the save to the db in
> compatable formats
>
> -- Wayne
I'm not sure
On May 21, 2:28 am, Colin Law wrote:
> If you save it in the database as a datetime then all should be well. If
Have you tried using the :db format?:
Time.now.to_s(:db) # this forces the save to the db in
compatable formats
-- Wayne
> that is not possible then you could have
If you save it in the database as a datetime then all should be well. If
that is not possible then you could have a virtual datetime member that you
setup in a filter after reading it from the db and this is what goes to the
form. You can then put the code converting it back to your homespun form
Use <%= date_select "user", "dob", {:start_year=>1960},
{:tabindex=>"4"} %>
But the tabindex will be the same for all 3 comboboxes.
Dmitry
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
Thanks, that worked. Still learning when to hash it up ;)
--~--~-~--~~~---~--~~
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 unsubsc
Just thought I'd let you know how things turned out.
I have discarded the idea of using date_select as it is full of
inconsistencies which in the worst case can cause the application to
crash.
Instead I created three seperate text fields (DD-MM-)and using
virtual attributes in the model ma
On Apr 3, 4:29 pm, Jim Burgess
wrote:
> > You can't easily stop the user entering dates like that with rails
> > built in date helpers, so you need to rescue those exceptions and
> > massage them into a friendly message.
>
> Hi Fred,
> I'm quite surprised, as I would have thought that this make
> You can't easily stop the user entering dates like that with rails
> built in date helpers, so you need to rescue those exceptions and
> massage them into a friendly message.
Hi Fred,
I'm quite surprised, as I would have thought that this makes the entire
date_select helper open to misuse.
Non
On 3 Apr 2009, at 14:02, Jim Burgess wrote:
>
> Thanks for the quick reply.
> It is important for my form that the date_select helper is not
> initialized with a value (ie. :include_blank => true).
> So, how could I stop the above error from happening?
You can't easily stop the user entering da
Thanks for the quick reply.
It is important for my form that the date_select helper is not
initialized with a value (ie. :include_blank => true).
So, how could I stop the above error from happening?
Could you give me a hint as to which direction to be thinking in?
I'm still relatively new to Rail
On 3 Apr 2009, at 13:38, Jim Burgess wrote:
>
> Hi,
>
> I'm writing a form where the user should enter their date of birth.
>
> Here's the code:
>
> <% form_for :applicant, :url=> {:action => "index"} do |f| %>
> ...
> <%= f.label :dob, "Date of Birth" %>
> <%= f.date_select :dob, :include_blank
Try this
<%= f.date_select :expiration_date, {:order =>
[:month, :year], :discard_day => true},{ :class => "dtfld"} %>
On Mar 14, 1:59 am, Jason wrote:
> I have the following code, but can't seem to get the class attribute
> to show up in the generated select elements. I saw something about a
>
Remi,
Sorry it's taken me so long to get back to you, I lost the thread...
I think what you're looking for is the callback from
ActiveRecord::Callbacks -- before_save
Rick
On Nov 1, 4:31 am, Rémi Gagnon <[EMAIL PROTECTED]>
wrote:
> Let me clarify.
>
> The date_select help generates 3 combobox,
Let me clarify.
The date_select help generates 3 combobox, days, months and year. So
for a user it is possible the select in days 31 for april, I know its a
wrong date that's why I want to nofify the user that he entered a wrong,
but when I display the page back whit the error the date has ch
I'm not sure about that "should be 31 April" since every April I've
ever experienced has only had 30 days. Your first statement "it
converts it for 1st may" actually seems to be correct behavior if
you're riding on time's arrow.
Rick
On Oct 31, 5:44 am, Rémi Gagnon <[EMAIL PROTECTED]>
wrote:
>
34 matches
Mail list logo