similar to: date

Displaying 20 results from an estimated 100000 matches similar to: "date"

2006 Dec 14
12
Saving dates
Hi having trouble saving dates in my form i have the following in the view <%= date_select("details", "open_date") %> and i have @exhibition.open_date = params[:details][:open_date] and then @exhibition.save All the other values form (not seen here) get saved but not the dates. What am i doing wrong ? -- Posted via http://www.ruby-forum.com/.
2008 Oct 31
3
Date_select vs wrong date weird behavior
In my date_select if I choose 31 april 2008, it converts it for 1st may 2008 which it seems odd for me? I say odd because first its difficult to validate at the model level, I have to hook some code in the controller and secondly when I finally get the validation errors I have to go back at the edit page and show the selected date(and the error message) which should be 31 april 2008 but the date
2007 Oct 13
5
default date for date_select
Hi, How can I set a default date for a date_select? I''m trying to do something along the lines of: <%= date_select("requirement", "target_date", :end_year => 2020, :discard_day => true, :include_blank => true, :order => [:month, :year], :default => {:month => 10, :year => 2012 }) %> but the default that comes up on the form is blank month
2007 Jan 11
5
how to have default date for date_select
lo there all, i want to have a date_select heper default to the year 2006, but cant seem to find out how to pull it off. any takers ? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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
2006 Dec 10
2
set specific date with date_select
Hi All I seem to have a problem with date_select methods. I cannot set a default date. I tried the following: <%= date_select( "post", "written_on", :selected => Date.new(2005,3,31), :order => [:day, :month, :year] ) %> But still I get todays date :( Any suggestions what I do wrong here ? Thnx a lot LuCa -- Posted via http://www.ruby-forum.com/.
2006 Jun 13
0
date_select and date validation
Hi, I''ve put together a simple form that contains among other things a date_select: <%= date_select(:user, :dob, :order => [:day, :month, :year], :start_year => 1900, :end_year => Date.today.year) %> In my controller I have some code to create a user entity from the parameters posted up from the form, like so: parameters:
2008 Feb 24
3
1 error(s) on assignment of multiparameter attributes
I am trying to create a form for processing credit cards. For the credit card expiration date, I would like to leave the day field out of the form for obvious reasons. However, the following code is producing an error for me. Any ideas? Thanks! <p><label for="email">Expiration</label><br/> <input type="hidden" id="user_card_expiration_3i"
2007 Apr 03
0
not showing dates < Date.today in date_select
HI there how do I tell date_select not to show the dates below Date.today actually Date.today + 14 Thanks in advance --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from
2009 Mar 15
0
Forms with date_select: How to set/leave a date to NULL?
Hi, minor question: If I create a form where some entries are of type date (i.e. use the form.date_select to create the form field), it does not allow to enter a NULL date. Even if the user does not enter anything, it forces a NULL date to become today''s date. Is there any (simple) way to give a date a NULL choice? regards Hadmut --~--~---------~--~----~------------~-------~--~----~
2006 Jun 30
0
storing dates from a date_select does not work
Hi there I''m having problems storing dates in a DB(postgreSQL) I have the field dtmfechanac of type date I have this in the view <%= date_select ''usuario'', ''dtmfechanac'', :start_year => 1900 %> and I have this in te controller data = { "dtmfechanac" => params[:usuario][:dtmfechanac] "dtmfechainicio" =>
2007 Jan 16
2
Specifying the contents of a date selector
Another n00b question (can you tell I don''t normally write view code yet???)... I''m using the date_select form helper to give me three select popups, (day, month, year). I want to specify that these exist and are set to today''s date I''ve tried this: response.should_have ''form > p > select
2006 May 09
0
Problem with date_select
Dates defined chosen with date_select are not coming through once the form is submitted. I have this in a form: <%= date_select ''search'', ''date_start'', :include_blank => true %> <%= date_select ''search'', ''date_end'' , :include_blank => true %> However, when I submit the form params[:search][:date_start]
2006 Feb 08
6
can''t get date_select to work
Hi, I render a couple of date_select fields, the HTML looks fine, I can see the values submitted back to the server, but AR doesn''t pick them up from the hash in Booking.new(params[''booking'']). I''ve got a ''booking'' object with parameters product, startdate and enddate. HTML snippets: <select
2006 Aug 03
0
Stuck saving Dates as string
Hi everyone, I have a form that has a date_select form field. Now for some reasons out of my control I need to save the date generated by date_select to a ''text'' field in mysql 5.0. Now i''ve been reading the ruby API for date and datetime objects...but so far I''m reallly lost. So to sum it up I have to make date(1i), date(2i), date(3i) into a mysql 5.0
2007 Apr 25
2
form_remote_for, reloaded
Hi, being relativly new to RoR, I''m having a problem which I found described in this forum and somewhere else - but with no solution. I know, that it may be bad to mix table and form tags, but the first solution of an in place editing within a table looked nice: Version using form_for: <tr> <%form_for :time_record, :url => { :action => "add_time_record" } do
2006 Jun 12
2
date_select() in collection
Hi, I am doing the following: <% obj.contracts.each do |@contract| -%> ... <%= hidden_field("contract[]", :contractor_id, :index => @contract.contractor.id) %> <%= date_select("contract[]", :starting_on, :index => @contract.contractor.id) %> ... <% end -%> Here are the request parameters: {"commit"=>"Save",
2009 Jan 21
4
Having troubles saving a new model
My model is being created but isn''t saving. It''s like it skips straight past saving. Any ideas why it might do this? Updating works fine. def create @volunteer = Volunteer.new(params[:volunteer]) @volunteer.save redirect_to(volunteers_url) end And here''s what the console reads upon create: Processing VolunteersController#create (for 127.0.0.1 at
2007 Jun 03
0
Possible to get month names as values when using date:select
I''m working on a project where a user will be entering a date from a form, and that date will be compared to a date that''s being pulled from an RSS feed. The RSS feed date format is 03 Jun 2007 so I was hoping to get my form date to use the same format. When I use <%= f.date_select :thedate, :use_short_month => true %> on my form, the presentation to the user on the
2008 Mar 17
0
Nil dates in selct_date
Can one specify to date_select that a nil value is permitted and is the default value? Is it possible to add nil to the list of permitted values in a date_select call? The code in /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/helpers/date_helper.rb seems to treat nil as now. 654 def default_time_from_options(default) 655 case default 656
2006 Nov 04
2
date_select parameter
Trying to add start year to date_select <%= date_select(:start_year => 1980)%> It''s throwing an exception "wrong number of arguments (1 for 0) Can''t I add a start_year, API shows this option ? TIA Stuart http://en.wikipedia.org/wiki/Dark_ambient --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the