Displaying 18 results from an estimated 18 matches for "select_month".
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 a javascript onchange call and I
can''t get it to show up.
Given:
select_month(date, options = {}, html_options = {})
I have:
select_month(0,:include_blank => true, :onchange => "setB...
2008 Nov 22
6
select_month post and params
...---------------------
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, :field_name => ''month_select'') %>
<%= submit_tag "Jump" %>
<% end %>
--------------------------------------------------------------
The notice is empty after the post.
Greetings, Andi
--
Posted via http://www.ruby-forum.com/.
--~--~-...
2005 Dec 12
1
Search screens with dates
...- select_datetime does not take the options that datetime_select
take - specifically :order
that leaves me with something like
<label>Date/Time To:</label><br />
<%= select_day time = Date.today, {:prefix => ''to''} %>
<%= select_month Date.today, {:prefix => ''to''} %>
<%= select_year Date.today, {:prefix => ''to''} %>
<%= select_hour Time.now, {:prefix => ''to''} %>
<%= select_minute Time.now, {:prefix => ''to'&...
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 params[:date][:month], plus
anything I could come up with, but so far no success.
Does anybody knows what I am doing wrong?
--...
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 =>
"born(3i)" %>
<%= f.text_field ?????? or text_field_tag ???????? field_name =>
"born(1i)" %>
I just can'...
2006 Jun 16
3
finding out about options
I''ve been to the RoR api docs trying to find out
about options for various methods (mostly for
select helper methods), yet I find no listing of
options even when the method described says
that it takes options. How
can I find out what are valid
options say for a date_select tag?
Thanks,
Dave
2008 Jul 04
4
Routing and Parameters
...#39;,
: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. Here''s my form:
<% form_tag(tasks_path, :method => :get) do %>
<%= select_month(Date.today, :prefix => ''month'', :discard_type =>
true %>
<%= select_year(Date.today, :prefix => ''year'', :discard_type => true
%>
<button>go</button>
<% end %>
If you submit this form, the request generates an URL like t...
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 Oct 29
1
:with for observe_field helper--parameter passing
I am trying to write a :with hash for the observe_field helper watching
a select which was built by select_month--it contains all of the months.
The current :with that I have, which works, is:
:with => "month"
,which passes the updated month in the select through params[:month].
However, I need to pass the current year through params[:year], which
does not change when the month select is upd...
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 Feb 05
0
How can i specify default time to datetime_select tag
...|position|
options.merge(:prefix =>
"#{@object_name}[#{@method_name}(#{position}i)]") }
datetime = options[:include_blank] ? (value || nil) : (value ||
Time.now)
datetime_select = select_year(datetime,
options_with_prefix.call(1))
datetime_select << select_month(datetime,
options_with_prefix.call(2)) unless options[:discard_month]
datetime_select << select_day(datetime,
options_with_prefix.call(3)) unless options[:discard_day] ||
options[:discard_month]
datetime_select << '' — '' + select_hour(dateti...
2006 Jan 16
0
Specifying Javascript events for form fields
...to submit each time the user changes their selection in
one of several select items (single selection only).
I''ve got this behavior working properly in the select_tag method, but I also
have two other fields on the form - a month and a year. The month and year
tags are created using the select_month and select_year methods,
respectively. I tried specifying an :onChange => ''submit()'' option for the
year and month methods, but it doesn''t appear to do anything, even though it
works with the select_tag methods.
Is there a way to do this? I''d hate to have t...
2006 Sep 27
0
adding id and class to date select helper.. is it possible ?
I need to observe a select_month or select_year tag... as I would like
to have an observe_field on them..
is it possible ? if yes how.. if no, is any trick to do it ?
thanks a lot
kad
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subs...
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: <%=
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 Feb 26
8
beginners question
...}) %>
<%= f.label( ''due date'' ) %></td>
<td>
<%= select_day( @day, { :disabled => @nodate }, { :id => ''did'',
:name => ''dname'' }) %>
<%= select_month( @month, { :disabled => @nodate }, { :id =>
''mid'',
:name => ''mname'' }) %>
<%= select_year( @year, { :disabled => @nodate ,
:start_year => 2009 },...
2004 Oct 25
1
Rails 0.8: Just shy of 100 additions, changes, tweaks, and fixes!
...<%= render_collection_of_partials("message", @messages) ||
"No messages found." %> [Sam Stephenson]
* Added :month_before_year as an option to date_select to get the month
select before the year. Especially useful for credit card forms.
* Added :add_month_numbers to select_month to get options like "3 -
March".
* Removed Base.has_active_layout? as it couldn''t answer the question
without the instance. Use Base#active_layout instead.
* Removed redundant call to update on
ActionController::Base#close_session [Andreas Schwarz]
* Fixed that DRb Store...