Displaying 20 results from an estimated 400 matches similar to: "problem with select_date"
2005 Dec 12
1
Search screens with dates
Tried googling and searching the lists for this. I''d like to do a
search on some dates and naturally enough use the date helpers. I
have a number of problems:
-- datetime_select wants an active record model
-- select_datetime does not take the options that datetime_select
take - specifically :order
that leaves me with something like
<label>Date/Time
2008 Jul 04
4
Routing and Parameters
Greetings. I have a route something like this:
map.calendar ''/tasks/:year/:month'',
:controller => ''tasks'',
:action => ''calendar'',
:year => /\d{4}/,
:month => /\d{2}/
(Ignore the obvious problems of invalid data.)
I''m trying to create a form that will allow my users to navigate from
one month/year to the next.
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
2007 Apr 12
3
Radrails and date in mysql problem
Hi,
Im using radrails and mysql database, im using DATE in mysql for a date
of birth column,
When i use this in Radrails the date shows as dropdown lists, the days
and month are fine but the year list only shows 2002-2012.
Is there any way of extending the years? as its not suitable for date of
birth.
Any help appreciated
--
Posted via http://www.ruby-forum.com/.
2009 Jan 28
1
How to give onchange for select_year rails helper....
<%=select_year(Date.today,:include_blank=>true, :start_year =>
Date.today.strftime("%Y").to_i, :end_year => 1999)%>
i am using rhis helper... now i want to give onchange here....
Please help me to solve this ....
thanks in advance
JK
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because
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,
2008 Feb 26
2
Specify HTML options on select_year
Rails 1.2.3
It appears that the select_year helper doesn''t accept HTML attributes as
part of the options array.
Does anyone have a way to successfully pass an :onchange attribute in to
the select_year helper?
I''m going to do it with Javascript directly for now.
Thanks,
Wes
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You
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_name =>
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/.
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 Jan 15
4
form inputs resetting on sumbit
I searched for forum for something about this but couldn''t find
anything.
For example I have this in my view: (you enter start/end dates from
dropdowns, pick a category and a report is generated.)
<%= start_form_tag :action => ''display_report'' %>
From: <%= date_select ''report'', ''date1'' %> <br />
To: <%=
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 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
2009 Sep 02
8
select_month helper
I''m trying to rewrite a fusebox-like application (Active4D plugin to
4D database) in RoR/postgres and I''m doing okay - but keep running
into things that stump me. It seems like it takes me hours to figure
out something that I could have written in pure code in minutes.
The select_month and select_day helper has been my latest waste of
time. All I''m trying to do is add
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
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;"}) %>
--~--~---------~--~----~------------~-------~--~----~
You received this message because
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'' %></td>
<td><%= select_date %></td>
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 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
2009 Feb 26
8
beginners question
hi group,
I am making a little rails app to experiment with rails. It consists
of one model, item, that represents an item on a todo list.
A todo item has a description, a state (finished or not) and a due
date.
After changing the scaffold screens a bit, I wanted to be able to
have no due date. I tried to do this by making a radio button; if ''no
date'' is selected, the date