Displaying 20 results from an estimated 1000 matches similar to: "date_select and date validation"
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 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
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
2008 Jun 17
0
how to set tabindex in date_select
<%= date_select(''user'', ''birthdate'', { :start_year =>
80.years.ago.year, :end_year => 12.years.ago.year } ) %>
work in rails 1.2.2
date_select(object_name, method, options = {})
I try many times but also didn''t know how to set tabindex in date_select
--~--~---------~--~----~------------~-------~--~----~
You received this message
2006 Apr 10
1
Bizzare Date, DateTime, date_select issues
I''ve been banging my head against this wall for several hours, and it
hurts now so I''ll stop and ask someone.
In one of my forms I had been using a statement to extract the current
year for use with some form field calculations.
<% currentyear = DateTime.now.year %>
And then further down several date_selects like the following,
<%= date_select
2006 Feb 18
0
indexed date_select
Hi All,
I am wondering if it is possible to have date_select fields that are
indexed for updating of multiple rows.
Here is my code:
<% @book.awards.each do |@award| %>
<tr>
<td><%= select("award[]", "category", [ "Fiction", "Non-Fiction",
"Poetry", "First-Boak", "Translation" ],
{ :include_blank
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 Sep 15
1
In datetime_select, :order does not work, but it works for date_select Why
Hi All
In my project I am to take date of birth from user so I used
datetime_select. It renders three selection boxes, year, month and day. But
I want order as day, month and year. I added :order option for
datetime_select, it renders normal selection boxes with order year, month
and day. Why :order does not work with datetime_select? see my following
code
<%= datetime_select(:user2,
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 Mar 15
1
Strange behaviour of dates
Imagine a crud app that tracks people applying for a loan, here is the
layout I have:
Mysql database:
create table apps (
id int auto_increment primary key,
primary_id int not null,
secondary_id int null,
constraint fk_primary_id foreign key(primary_id) references (contacts.id),
constraint fk_secondary_id foreign key(secondary_id) references
(contacts.id))
create table contacts (
Id int
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 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 Jan 20
0
Problem with updating model
I trying to update DATE type field in MySQL but such errors occurs
errors:
password_confirmation:
- "can''t be blank"
birthday:
- "can''t be blank"
Spending hours on that, I cann''t find the reason
But I''ve filled "login" "password" "password_confirmation" and
"birthday" fields
2007 Oct 13
5
default date for date_select
Hi,
How can I set a default date for a date_select?
I''m trying to do something along the lines of:
<%= date_select("requirement", "target_date", :end_year =>
2020, :discard_day => true, :include_blank => true, :order =>
[:month, :year], :default => {:month => 10, :year => 2012 }) %>
but the default that comes up on the form is blank month
2008 Feb 24
3
1 error(s) on assignment of multiparameter attributes
I am trying to create a form for processing credit cards. For the
credit card expiration date, I would like to leave the day field out
of the form for obvious reasons. However, the following code is
producing an error for me.
Any ideas?
Thanks!
<p><label for="email">Expiration</label><br/>
<input type="hidden" id="user_card_expiration_3i"
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]
2005 Sep 16
0
Specify attributes for 'date_select' select inputs
Hi,
I could not find an easy way to specify the ''id'' attribute for select
inputs of ''date_select'' form helper.
I need to set it because I want to retrieve date selects values from a
javascript.
<%= date_select ''product'', ''expiration'' %>
generates
<select name="product[expiration(1i)]">
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
2007 Jul 30
0
Setting AR attribute from date_select values?
I have a date select:
<%= form_fields.date_select :birthday_on, :order => [:month, :day,
:year], :start_year => 1900 %>
In my controller I want to set the individual attribute. How do I do
this?
user.birthday_on = params[:user][:birthday_on]
How do I convert this to a date so it set properly?
Thanks for your time!
--
Posted via http://www.ruby-forum.com/.
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