Displaying 20 results from an estimated 700 matches similar to: "Specify attributes for 'date_select' select inputs"
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",
2006 Feb 28
1
Working with date_select ...
I am a little confused about the best way to work with date_select. I see that
in my views it generates a simple input form that allows for the entry of year,
month and date information. If I just leave it at that, great!
But what if now in the controller, I want to work with the date information. I
actually want to take the user input date and compute a new date some number of
days in the
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 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" =>
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",
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:
2006 Jul 24
1
date_select and ActiveRecord find()
If I pass a date through date_select to a controller, can a Active
Record object be found based on this date that is passed? Here is
what my log says:
ArgumentError (Unknown key(s): publication_date(2i),
publication_date(3i), publication_date(1i)):
/opt/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/hash/keys.rb:48:in
`assert_valid_keys''
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 Jun 05
1
Format Values from a date_select
Hi
I have two date select options in a form, when I try and grab these
values using somthing like
@pMax = params[:max]
I get this in the varibale name
max(1i)2006max(2i)6max(3i)5
which has the correct data, jsut with added things like max(1i)
Whats the best way of grabbbing this data into a variable without the
extra titles?
Scott
--
Posted via http://www.ruby-forum.com/.
2010 Jun 24
0
searchlogic+date_select+ordering
hi there,
i try to use searchlogic to find entities by date.
its working if i just try to search something.
the ordering helper is also working if i just show all results.
if i want to order (lets say by zipcode) and find by date it wont work.
the order helper messes up the params[:search] in case of using a date
if i just search something the params look like (good):
Parameters:
2006 Jul 06
3
Understanding date_select naming conventions
I am using the date_select helper to generate date select elements in a
form.
I notice that the generated HTML shows that these selects have the
following names:
Month: current_job[StartDate(2i)]
Day: current_job[StartDate(3i)]
Year: current_job[StartDate(1i)]
I''m assuming that the Xi identifiers somehow specify the appropriate
date part from a date or time value.
Can anyone
2006 Jul 26
2
text_field and date_select in collection
hello,
i would like to display a collection of records on one page (e.g. an
author record with all his/her books).
a record contains a text_area (e.g. a description of the book) and a
date_select (e.g. when the book was published).
<% for @book in @author.books %>
<%= text_area ''book[]'', ''note'' %>
<%= datetime_select
2006 Jan 06
0
date_select and sessions
i am using date_select to allow someone to select their birthdate in a
form. however date_select uses 3 wierd labels in the forms like
follows:
<select name="user[birthdate(1i)]">
<option value="1940">1940</option>
<option value="1941">1941</option>
.
and then the month is user[birthdate(2i)] and so on. My issue is i
dont know the
2005 Oct 20
3
Missing id on date_select (0.14.1)
I''m getting markup violation errors on my tests and I noticed
that a template with this (a modified 0.13.1 generated scaffold).
<label for="credit_card_account">Account</label>
<%= text_field ''credit_card'', ''account'' %>
<label for="credit_card_expires_on">Expires on</label>
2006 Jan 19
2
date_select broken
I am using date_select and in some instances it only shows about 10
years worth of choices. Same form on other users shows the whole
range. date_select looks like this
<%= date_select ''user'',''birthdate'' , :start_year => 1940 %>
I would expect to always see 1940-2006 or so , but i dont always do.
Is there a way to force the range or explain why i
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
2005 Feb 15
5
date_select where to add "class"=>"something"
Hi,
I''ve looked on api.rubyonrails.org but I''ve not found how to add to a
date_select(object, method, options = {}) a class option to set the
class of all the select tags.
I''ve tried using "class" => "myclass" in thoose ways:
<%= date_select("costo", "data", "class" => "testo" ) %>
<%=
2005 Dec 15
1
date_select help
I''m trying to select items from a database by their date field. The date
data is coming from a form using the date_select helper.
The field in the database is named date_notified_on.
My controller method is this:
def history_date
if(@params)
@notifications = Notification.find(:all, :conditions =>
["date_notified_on = ?",
2007 Jun 13
3
date_select css options
Just looked at the Date helper in the rails API and noticed that none
of the functions there (i.e. date_select) allow me to specify html
options (i.e. class) for the generated selects.
I was wondering how do other group members css format date select
dropdowns?
Best,
Gabor
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google