Displaying 20 results from an estimated 8000 matches similar to: "date_select helper error"
2006 Jul 15
1
Trouble using date_select with blank options
I want to allow users to enter a day and a month, but not necessarily
a year. i.e. it should be optional.
If I select the day and month, but a blank year and then submit i get:
1 error(s) on assignment of multiparameter attributes
The paramaters regarding the date look like this:
{"date_of_birth(2i)"=>"3",
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:
2007 Apr 14
1
how to add class to date_select helper
Hi,
I have this helper and would like to add a html class to each of the
select box''s it generates, however I have been unable to find a way?
<%= f.date_select ''date_of_birth'', :order => [:day,:month,:year],
:start_year => 1940, :end_year => Time.now.year, :include_blank => true
%>
Any suggestions?
thanks
john
--
Posted via
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]
2005 Dec 27
0
date_select and :include_blank
Hi,
date_select is a great helper, but I couldn''t find a way to make it display
a text like "Please Select" instead of blank field.
When I use date_select with a param of :include_blank => true, it renders an
option with a value of "" and string of "". I want to display "Please
Select". Anyway to do this? Maybe overwriting ActionView modules
2006 Feb 18
0
indexed date_select
Hi All,
I am wondering if it is possible to have date_select fields that are
indexed for updating of multiple rows.
Here is my code:
<% @book.awards.each do |@award| %>
<tr>
<td><%= select("award[]", "category", [ "Fiction", "Non-Fiction",
"Poetry", "First-Boak", "Translation" ],
{ :include_blank
2008 Jun 26
2
Problem with date_select after Rails 2.1 upgrade
Folks,
I think I should start a new thread for this, because a similar one I
saw is a bit old and the resolution there doesn''t seem to apply to
what I''m running into now.
Anyway, my date_select calls are bombing on me with the exception:
----
ActionView::TemplateError (wrong number of arguments (3 for 2)) on
line #8 of entries/_dates_form.haml:
8: = date_select(
2006 Aug 31
0
date_select error
Hi, when I try to use a date_select like this:
<%= date_select(:contact, :event, :discard_year => true) %>
I get the following error:
1 error(s) on assignment of multiparameter attributes
Ticket #3811
(http://dev.rubyonrails.org/attachment/ticket/3811/date_helper_megapatch_against_1.1.2.0)
Says it''s already corrected but I''m using rails 1.1.6 an still get the
error.
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
2006 Feb 04
0
date_select
Can you see an obvious reason why this date_select code is failing?
The parameters from the form -
*Parameters*: {"commit"=>"Save All Changes", "campaign_id"=>"1",
"campaign"=>{"name"=>"fdsfas", "end_date(3i)"=>"26",
"start_date(1i)"=>"2006",
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"
Overriding date_select in local project to use custom value rather than blank for starting option...
2005 May 08
3
Overriding date_select in local project to use custom value rather than blank for starting option...
I would like to have a date control on a page and I would like a
behavior similar to what you get using date_select with the
:include_blank => true option where the first value in the dropdown is
"- Month -", "- Day -", or "- Year -" rather than a blank value for
the respective month, day, and year select fields.
I took a look at the ruby source for
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
2011 Jan 04
1
Problem with "date_select" form helper
Hi,
I am using "date_select" form helper to select the date.
My code is as follows:-
<%=date_select("post", "written_on", :prompt => { :day => ''Select day'',
:month => ''Select month''}, :discard_year=>true)%>
It works.
But there is problem with the number of days for each month.
The days combobox has populated with
2005 May 31
2
Form Dates and MultiparameterAssignmentErrors
I''m using the date_select form helper for a date_of_birth field on an
ActiveRecord object. When I try to save a date earlier than 1 Jan 1970,
ActionController punts with
ActiveRecord::MultiparameterAssignmentErrors. The message it gives is
"1 error(s) on assignment of multiparameter attributes". I was able to
catch the exception and look at it, and it is certainly complaining
2007 Jun 22
2
problem with AR and 'virtual' multiparameter attributes.
Hello,
I have a model which I would like to have a ''virtual'' date column.
This column wouldn''t exist in the database, but would exist for
validation, etc. The data would be provided in the form of a
date_select in the view. This produces a multiparameter attribute. My
problem is that the ''execute_callstack_for_multiparameter_attributes''
method in
2006 Jul 07
0
datetime/date problems w/ Oracle
I am "script\generate scaffold"ing w/ Oracle. The CRUD controls for DATE
columns in _form.rhtml are generated as datetime_select, rather than
date_select . This is understandable, as Oracle uses a DATETIME data type
for DATE columns. I''m also not too bothered by the fact that I have to
manually replace "datetime_select" w/ "date_select" for all
2006 Jun 01
1
Default Value for date_select helper
Hi All:
Just curious if anyone has figured out how to set a default date for the
date_select helper.
My application has a form with both a start date and end date select for
the user. Since the period between the two is a minimum of 24 hours I
wanted to have the start date default to Date.today (which it does
automatically) and then have the end date default to the following date
(i.e.
2006 Jun 15
0
Localization of the date_select -helper
I could use some help with translating month names for the date_select
helper using gettext.
Think my best bet would be to override the
ActionView::Helpers::DateHelper.select_month method once gettext is
initialized, which is done by a before_filter in ApplicationContext,
but have no idea how I would go about that.
Any suggestions appreciated,
Isak
2006 Mar 15
1
Strange behaviour of dates
Imagine a crud app that tracks people applying for a loan, here is the
layout I have:
Mysql database:
create table apps (
id int auto_increment primary key,
primary_id int not null,
secondary_id int null,
constraint fk_primary_id foreign key(primary_id) references (contacts.id),
constraint fk_secondary_id foreign key(secondary_id) references
(contacts.id))
create table contacts (
Id int