similar to: Localization of the date_select -helper

Displaying 20 results from an estimated 7000 matches similar to: "Localization of the date_select -helper"

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
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 May 03
2
Using a helper within another helper?
I am trying to push some view logic into a helper. The thought is that this is a step towards having the business logic in the helper rather than the view. However, I''m essentially wrapping the checks around an eventual call to date_select(). The problem I''m having is that the application complains that it doesn''t know about date_select(). I''m sure (or
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 07
4
set date with date_select
when retreiving a date from a DATETIME field in a database, is there a way to set the date to the value of the DB in the view? It seems to always default to the current date... if I have a field called birthdate in the users table and i do @user = User.find(@params[:id]) in my view i have a <%= date_select ''birthdate'',''user'' %> but dont know how to
2006 Feb 05
0
How can i specify default time to datetime_select tag
I want to specify a different default time to datetime_select tag how can i do that. also i was looking at rails helper code ----------------------------------------------------------------------- module ActionView module Helpers module DateHelper def to_datetime_select_tag(options = {}) defaults = { :discard_type => true } options = defaults.merge(options)
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
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 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.
2005 Nov 14
0
date_select helper error
I have this date select helper: <%= date_select("customer", "dob", :include_blank => true, :order => [:month, :day]) %> I get this error when posting the form: 1 error(s) on assignment of multiparameter attributes The error happens when I take off the :year option. Any clues as to why this maybe happening? Serge
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 Jul 26
1
Plz answer my query in date_select
hello gentlemen I want to set my (default)own date in date_select, how to do this, plz explain with example advance thx have a nice day regards narayana -- Posted via http://www.ruby-forum.com/.
2007 Dec 26
2
Overriding or changing HTML generated by date_select?
Hi, I''m looking for a way to customize the HTML forms generated by date_select. I''m especially keen on replacing the year and possibly day input by a simple text field, since honestly, I find listboxes for years to be quite retarded (if I wanted client-side validation, there would be better ways to do that instead of having people try and find their year of birth in a list of
2006 Jul 17
0
Ruby-GetText-Package-1.7.0
Hi, Ruby-GetText-Package-1.7.0 is now available. Enjoy L10n! Changes ------- * Improve to support Ruby on Rails * Localize ActionView::Helpers::DateHelper.distance_of_time_in_words. * Localize ActionView::Helpers::ActiveRecordHelper.error_message_on. * Add ActiveRecord::Base.untranslate, .untranslate_all to prevend to translate columns. * "ID" fields are ignored as
2005 Dec 01
0
Problem using a date helper
Hi, I''m having trouble getting a date helper working. I was pointed to this by Sean Allen, and it resides at http://theredheadedstepchild.net/articles/2005/08/04/datehelper-fixes It''s meant to fix the bug in Rails which doesn''t allow datetime_select to properly discard the year. So, I''m trying to use the helper''s time_select function. date_helper.rb
2006 Aug 23
11
i18n friendly, plugable Rails Core
In my work with a simple localization plugin, i''m running into a lot of places in the Rails core, where text and other localization specific information is hardcoded. I''ve included some examples in the bottom of this post. It''s hard for an outsider to know, if the hardcoded values are a result of inconsistency in code, or "by design". I hope that we can have
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
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 = ?",
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 Apr 04
0
Does observe_field work with date_select?
I can''t get observe_field to do anything with my date_select. Here''s the rhtml code: <%= date_select ''course'', ''lab_start_date'' %> <%= observe_field(:course_lab_start_date, :frequency => 0.5, :update => :course_lab_start_date_div, :url => { :action => ''preview_text''}) %> My