similar to: datetime_select discard year bug?

Displaying 20 results from an estimated 10000 matches similar to: "datetime_select discard year bug?"

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-13 00:00:00'' so my question is how do i get the time object properly
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 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?
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 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
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
2005 May 03
0
:discard_year => true for date_select
Hey guys, There''s been a patch in the queue for a few days around the discard_year option for date_select and datetime_select. The author has also attached a second patch which makes similar changes, but instead of just dropping the field, a hidden field is used instead. We only need one of these tickets open, and we probably should apply one of the patches.
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
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 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
2005 Dec 31
7
Application Errors w/ layout & custom view pages
1) I get Rails Application Error when trying to use layout test_controller def list layout "stdlayout" end in the views/test/layouts stdlayout.rhtml <html> <head><title>test</title></head> </body> <h1>Test</h1> <%= content_for_layout %> </body> </html> 2) I get Rails Application Error when trying to use a separate
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''m in this for some hours, but could not find a
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'',
2006 Jan 13
4
missing foreign key fields in scaffold views
Is there any reason that foreign key fields do not show in any of the scaffold views ? project table: id serial primary key, category_id integer, user_id integer, name varchar, morestuff varchar foreign key (category_id) references categories(id), foreign key (user_id) references users(id) scaffold generated views only show name, morestuff fields
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
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
2011 Jun 06
0
datetime_select and in_time_zone?
I''m working with an app for a concert tour website (www.yogabbagabbalive.com), where all times (announcement times, on-sale start times, and event start times) are local to each particular venue''s time zone. I take the user entered date/time where applicable and run a before_filter to set the appropriate time zone so that everything is stored in the database in UTC. For the
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.