Displaying 20 results from an estimated 6000 matches similar to: "datetime_select and discard"
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 Mar 21
5
Getting a time select input
I''m having trouble workign out which ActionView DateHelpers to display a
time input for an ActiveRecord field of type :time.
I just want an hours input and a minuites input. I can get these with
time_select helper using :field_name and :prefix but it gives both hours
and miniutes the same name.
<%= select_time(Time.now, :prefix => "search", :field_name =>
2006 Jan 25
0
datetime_select discard year bug?
I''m trying to have a select box for starting time. I''m using:
datetime_select(:user, :start, :discard_year=>1) but I get an error.
"discard_month=>1" seems to work but leaves the year on the form. Using
Rails 1.0 and Postgresql. Anyone having success with this?
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 Jul 04
4
select_datetime // datetime_select
Hi I have 2 question for you guys,
1. Which is the difference between this two methods? (select_datetime,
datetime_select)
2. How I assign the selected date-time values, to an specific variable
or array using select_datetime
I know do it using datetime_select(''object'',''method'')
I aprecciate your attention.
Thanks
PD: Sorry about my english.
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)
2006 Apr 04
2
Accessing datetime_select value
How do I get a value from datetime_select? Do I need to get each value
from it''s dropdown element individually or is there a way to get the
date by referencing one object? Anyone have any good examples?
-Andy
2005 Dec 23
6
Selecting time
I''m currently building a small app that''s going to be used to keep track
of the amount of time spend on customers of the company I work for.
This mainly consists of object with a begin time, an end time and a
calculation of the difference between those timestamps (actual time
spend on the job).
I made a small form with a datetime_select helper for the begin and end
time (the
2006 Jan 26
3
discard_year => true
Hi All
I''m attempting to make a simple time select field so I thought I just
needed a datetime_select with the option :discard_year => true.
However, every ''discard'' option except discard_year seems to work. So
I''m left with a year, hour and minute to select.
Could anyone please point me in the right direction?
Much appreciated.
Doug
--
Posted via
2006 Mar 02
6
Newb question about facade columns
Hello,
I am trying to deal with a database table that contains a date in the
form of the number of seconds since epoch. Data is inserted in this
format by an existing script that I can''t change, so a schema change
isn''t realistic.
I would like to allow humans to view and edit this data in the form of
an actual human-readable date. I figured a facade column would be the
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 Feb 22
1
specifying m/d/y order in datetime_select
the date_select form helper has a neat little feature which lets you specify
the order of the month/day/year that is displayed on the form via the :order
parameter. i.e.
<%= date_select ''blah'', ''somedate'', :order=>[ :month, :day, :year ] %>
however, i don''t see a similar option for datetime_select. passing
an :order parameter is happily
2008 Jun 09
3
Rails 2.1 and ddatetime_select
I''ve updated to 2.1 and am continuing to have issues with
datetime_select helpers which worked fine previously.
Example:
<% form_remote_tag(:url => { :controller => ''notes'',
:action
=> :add_booking_note_ajax,
:id => @booking},
2006 Apr 20
4
Small Date Formatting Question regarding datetime_select()
Is there a way to make datetime_select() dropdowns work on a 12hr
clock? I need to make a input field that works exactly like the
reminders datetime selecton dropdowns in Backpack to populate a
datetime field in my DB. i.e in the format: month, day, year ? hour
(1-12) minute am/pm. Should I change my database to have a separate
column for date and one for time and use date_select()?
Can
2006 May 18
4
time select with am/pm?
Hi everyone,
Is there a time select helper which uses a 12 hour clock rather than a 24
hour one? Also, does anyone know if :discard_year actually works in
datetime_select now, or how I could find this out?
Thanks!
Daniel
2006 Aug 07
1
datetime_select problems
Hi,
I have a datetime select in my form like this:
DATE/TIME REPORTED: <%= datetime_select ''report'', ''rep_date'' %>
This works beautifully for creating a new record. The data is saved as:
2006-08-07 11:33:00
Now, the problem is when I try to load the form with saved values
to do an update.
The above code works and loads the saved data in another one
2007 May 12
4
help, 1 error(s) on assignment of multiparameter attributes
Hi everyone!
I just started learning Ruby on Rails about a week ago for a school
project, and can''t seem to find a solution for something.
I have this inside the form inside of edit_albums.rhtml:
<%= start_form_tag :action=>''proccess_edit_album'', :id=>@album.id %>
....
Release Date: <%= datetime_select(:album, :release_date, :start_year
=> 1960)
2008 Apr 14
3
datetime_select custom input fields
by default datetime_select allows the user to input any date and time
they want.
Is there a way it can only allow a user to select an hour between 8AM
and 6PM and only allow them to choose the top of the hour (:00) and
the half hour (:30) for the minute?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on
2006 Jan 22
0
datetime_select with postgresql time field
I get errors when committing to a postgresql time field using
datetime_select discarding year,month, day. Also, year shows on my form
despite calling "discard_year=>1. Do I need a special mapping for time
fields ? Any ideas?
2007 Dec 12
3
datetime_select and Active Record
If I have a form similar to the one below, and ''start'' is a "string"
field in my Database. Is there a way to take all of the date/time
params and put them into ''start'' without too much hacking? I would
like this to be as clean as possible.
<p><label for="start_time">Start Time</label><br/>
<%=