Displaying 20 results from an estimated 24 matches for "select_d".
Did you mean:
selected
2006 Jul 02
1
DRY? Why select_date and select_date?
Why select_date and select_date?
I dont understand why having both (backward compat?).
I also look that their source are different, one use the InstanceTag
and others calls 3 select_(year, month, day) functions.
2006 Dec 08
4
select_date method
Hi Everyone,
I used "select_date" method in my application and got 3 select boxes
for Date, Month and Year.
Code :
<td><%= text_field ''content'', ''title'' %></td>
<td><%= text_field ''content'', ''description'' %>...
2006 Mar 21
5
Use select_date for my model?
Hi all
I have a model "party" that has a time field "starts_at". I have created
a form to add new instances of this model.
<%= select_date Date.today, :prefix => ''party'' %>
Sadly I get the error:
NoMethodError in Parties#add
undefined method `month='' for #<Party:0x256a600>
How can I fix this problem? I remember that I saw in scaffolds that date
selectors have something like party[year(1n)]...
2008 Dec 13
0
select_tag and select_date how to change inline font
I have been trying to change the font size in the select_date but i
haven''t had any luck
here''s what i did:
<%= select_date( Date.today, :prefix => ''prom_date_end'', :order =>
[ :day,:month, :year], :html => {:style => "font-size: xx-small;"}) %>
--~--~---------~--~----~------------~-------~-...
2005 Aug 15
1
html_options for select_date
As far as I can tell, it''s not possible to use html_options in
conjunction with the select_* helpers.
This means using them in conjunction with observe_field etc is pretty
much impossible.
Does anyone have a patch to add this functionality, or know of a workaround?
I''m having a look at the moment, but not sure how to get it working
without breaking existing stuff.
--
2006 Jun 17
2
problem with select_date
In my form I have these items:
<%= select_year Date.today,
:start_year => Schoolyear.get_startdate.year,
:end_year => Schoolyear.get_enddate.year %>
<%= select_month Date.today.month %>
No matter what I do, in my controller I can''t seem to access the
selected year and
month.
I have tried params[:month].to_s and also
2006 May 03
3
using select_date causes errors...
I''m getting errors whenever the user chooses, for example, April 31st (
since there is no 31st in April, navicat freaks out ), there MUST be a
method that ruby has that would allow me to validate a date before I
submit to navicat.
I haven''t been able to find anything online about it either, it''s
probably something simple, I just can''t figure it out.
Thanks
2006 Oct 25
1
Help with a select_tag; getting an undefined method `stringify_keys' error
Hi,
I''m trying to use a select_tag in the following manner:
<%= select_tag(:received_at, @select_dates, String(params[:received_at]) ) %>
But I get this error:
undefined method `stringify_keys'' for "":String
Removing the third parameter eliminates the error, but I was hoping
that the drop-down list will select whichever string in the drop-down
list matches params[:receiv...
2006 Mar 06
2
form_tag error -- not found, 404 -- action DOES exist!
...<tr>
<td>
<%=
select_tag("site_visit_helper[timesheet_records][#{i.to_s}][surveyor_id]",
options_for_select(@surveyors, tr.surveyor_id))
%>
</td>
<td>
<%= select_date(
hash2date(tr.visited_on),
:prefix=>"site_visit_helper[timesheet_records][#{i.to_s}][visited_on]",
:include_blank=>true) %>
</td>
<td>
<%= select_time(...
2006 Jul 25
0
Helper in controller?
...ull out certain statistics from a certain
period.
In my view, I''ve added something like this:
[view]
<%= form_tag :action => "bu" %>
<select name="bu">
<option value="04">Germany</option>
</select><br>
From: <%= select_date(date = Date.today, :prefix => ''from'') %><br />
To:<%= select_date(date = Date.today, :prefix => ''to'') %>
<%= submit_tag ''BU stat'' %><br /><br />
<%= end_form_tag %>
Now, to be able to build the se...
2010 Jul 26
1
form date helper with text year
I have a date where the year range is more then I want to define in a
select_date scaffold generated year range.
My idea was to have the year entered as a text field and the month and
day using something like:
<%= select_month @person.born,:prefix => :person ,:field_name =>
"born(2i)" %>
<%= select_day @person.born,:prefix => :person , :field...
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
2008 Nov 22
6
select_month post and params
Hi
why is that not working?
Controller-----------------------------------------------------
def bla
month = params[:month_select]
redirect_to :action => "index"
flash[:error_messages_for] = month.to_s
end
View----------------------------------------------------------
<%form_tag :action => "bla" do %>
<%= select_month(Date.today,
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 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/.
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 May 24
2
Only years from 2001 to 2011 are available in a date field
When I try to edit a date field in the drop down list I have only years
from 2001 to 2011: how can I add an arbitrary year that is NOT included
in this list?
--
Posted via http://www.ruby-forum.com/.
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 Jan 27
2
pagination and nested parameters
Hi all,
I''ve got a couple select_date form helpers. For pagination, I need to submit
these form values. I tried this, but it''s apparently wrong:
link_to ''Previous page'', {
:page => @schedule_pages.current.previous,
:params => {:date => {:month => @month}, :date => {:year => @y...
2006 Sep 26
0
Bug or Feature?
Hello,
I know this came up before hand, but I haven''t seen a conclusive
answer. This is with regards to the MultiparameterAssignmentErrors and
select_date when submitting an invalid date (September 31st for
example). It seems that when an invalid date is submitted, the date
value should be set to nil as opposed to throw an exception that seems
a bit hard to catch elegantly and then provide validation.
The exception is raised in ActiveRecord::Base...