Displaying 20 results from an estimated 69 matches for "datetime_select".
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(...
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 }
optio...
2006 Feb 22
1
specifying m/d/y order in datetime_select
...le 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 ignored by the method. i would assume this is
the case because either :order needs more parameters (:hour, :minute don''t
work) or it is not parsed in a datetime_select context.
so, is this ordering available in datetime_select?
thanks!
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...
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 anothe...
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
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 thi...
2006 Mar 21
5
Getting a time select input
...ame.
<%= select_time(Time.now, :prefix => "search", :field_name =>
"start_time") %>
<select name="search[start_time]">
<!-- hour options -->
<select name="search[start_time]">
<!-- min options -->
I see when you use the datetime_select it gives each element something
like 1i, 2i, 3i and 4i, this does not happen with select_time.
The datetime_select would work if I could get rid of the date part,
there is no time_select helper! And I have tried adding the :discard
option but it does not get rid of the year...
<%= datetime_...
2006 Nov 04
0
observe_field and datetime_select
Hello all,
I have a form with a datetime_select.
I need to use the actual time selected in an action triggered by
observe_field.
Could make it work with other select fields, but not with datetime_select.
Seems that observe_field can locate the element just by the id (not by the
name).
If so, how can I set the ID of datetime_select ???
I'&...
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
2006 Mar 01
0
datetime_select & styles
Hello,
apologies if this has a trivial solution but after rumaging around
google for a while I haven''t found one. I am trying to set the style of
the datetime_select compound widget but it appears to ignore all my
efforts ... the API specifies
datetime_select(object, method, options = {})
so you would expect
<%= datetime_select ''log'', ''available_start_on'',
:class=>"some_css_class" %>
to work? Or am I mi...
2005 May 02
1
datetime_select and discard
ok so datetime_select if you use the discard options
say { :discard_month => true }
when you just do update_attributes on said object
year would be correct
month would be the hour
date would be the minute
so if you select
year: 2005
hour: 12
minute: 13
the time object would go into the db as:
''2005-12...
2008 Jan 25
1
form error with datetime select
Hi, Im trying to build a form using:
<% facebook_form_for(:task, at task,:url => create_task_path) do |f| %>
Assign Task To: <%= fb_friend_selector %>
<%=f.text_field :ttype, :label=> "Title"%>
<%=f.datetime_select :duedate, :label=> "Due Date"%>
<%=f.buttons "Add" %>
<% end %>
But im getting an error:
ActionView::TemplateError (undefined local variable or method
`_erbout'' for #<Facebooker::Rails::FacebookFormBuilder:0x24c5c50>) on
line #12 of app...
2006 Aug 10
1
Convert datetime_select to Time object?
--------------------------
Question 1
--------------------------
I am dealing with a database that holds products and it has a datetime
field called "active_at". so I have the following for active_at:
<%= f.datetime_select :active_at %>
It gives me 5 different params:
params[:product][:active_at(1i)]
params[:product][:active_at(2i)]
params[:product][:active_at(3i)]
params[:product][:active_at(4i)]
params[:product][:active_at(5i)]
How do I convert this into a Time object?
--------------------------
Question 2...
2011 Jun 06
0
datetime_select and in_time_zone?
...se in_time_zone to adjust per the particular venue.
The only issue is on the edit form. The date/time select is showing the data
in UTC. When I''m working on the site, I mentally adjust, but for others it''s
confusing. I''d like to do something along the lines of:
<%= f.datetime_select :start_datetime.in_time_zone(@event.time_zone) %>
Or, in the controller:
def edit
@performance = Performance.find(params[:id])
@event = @performance.event
@performance.start_datetime =
@performance.start_datetime.in_time_zone(@event.time_zone)
end
Then simply, <%= f.datetime_select :...
2007 Dec 12
3
datetime_select and Active Record
...ring"
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/>
<%= form.datetime_select ''start'' %></p>
To clarify, when "new" is called, my rails app does the standard:
@period = Period.new(params[:whatever])
I''d rather not break that apart if possible. Please let me know if
this doesn''t make
sense.
Thanks!
--~--~---------~-...
2006 Jul 14
0
datetime_select and onchange?
Is it possible to add an onchange handler to a datetime_select call?
I realize the complication exists in that the helper actually creates
many different select elements, but rails could just spread the
onchange across all of them.
-Payton
2006 Apr 18
0
how to inser value of datetime_select value in database
hi all
how to insert datetime_select value in database.
i have two fields in my form.rhtml
can any body tell how i can get this value.
i used in controller
def insert
@order=Order.new(params[:stock])
if @order.save
render_text "record inserted"
end
end
but it only enter stock name not date time value
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?