similar to: Use select_date for my model?

Displaying 20 results from an estimated 200 matches similar to: "Use select_date for my model?"

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 =>
2005 Dec 12
1
Search screens with dates
Tried googling and searching the lists for this. I''d like to do a search on some dates and naturally enough use the date helpers. I have a number of problems: -- datetime_select wants an active record model -- select_datetime does not take the options that datetime_select take - specifically :order that leaves me with something like <label>Date/Time
2004 Apr 02
2
Futzing with TaskScheduler
Hi all, Thought I should say something - it''s been a little while. :) Anyway, I''m still futzing with how I want the Ruby API to look. The more I look at the Perl version, the more I think it was too faithful to the C API. Right now I''m looking at the trigger() method. For example, I don''t see any reason to make the "type" key take a hash as an
2006 Jun 16
3
finding out about options
I''ve been to the RoR api docs trying to find out about options for various methods (mostly for select helper methods), yet I find no listing of options even when the method described says that it takes options. How can I find out what are valid options say for a date_select tag? Thanks, Dave
2006 Jul 18
1
Auto-populating time portion of a datetime field from a form
I see that if I use the date_select helper in my view, then in the generated page, my selects are named obj[datetime_field(1i)] (and 2i and 3i for the other parts). These auto-populate the date portion of my datetime_field. I have another datetime field that I''m presenting the time from and I would like to use a similar scheme to autopopulate it. Currently, I''ve used the
2006 Jul 16
1
form helpers with non-ActiveRecord objects
I have an ActiveRecord model (called Festival) that contains an array of "FestDate" objects serialized into a sql text column of the Festival object. (like the Agile book first edition describes on p. 205) The FestDate objects themselvs are not ActiveRecord objects. (of course, otherwise they would be in their own table...) When working with a Festival, I would like to use various
2004 Jul 31
3
Bug in new_work_item
Hi all, Windows 2000 Ruby 1.8.2 R7 VC++ 6.0 I noticed that if I try to call new_work_item and give the task a name that already exists, I get a segfault: C:\eclipse\workspace\win32-taskscheduler>ruby test.rb "0.1.0" test.rb:22:in `new_work_item'': NewWorkItem() function failed (Win32::TaskSchedul erError) from test.rb:22 test.rb:22: [BUG] Segmentation fault ruby
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
2005 Sep 04
1
Fwd: Win32 Utils TaskScheduler
Note: forwarded message attached. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An embedded message was scrubbed... From: Scott Harper <sharperct@gmail.com> Subject: Win32 Utils TaskScheduler Date: Sun, 4 Sep 2005 17:04:24 -0400 Size: 4971 Url:
2008 Jan 12
2
win32-taskscheduler and TaskScheduler#account_information
Hi, This library has needed some work for a while, so I''m finally getting around to it. I''ve made some changes and updates in CVS, so grab the latest source to test the issue below. The first issue I''d like to tackle is why the TaskScheduler#account_information (GetAccountInformation) method fails if there''s no user associated with a given task. The docs
2011 Aug 06
7
Accessing datetime elements from hash passed to method
I''m passing hash (called ''params'') to a method. Some keys (one of them is called ''starts_at'') in that hash have date as a value (taken from datetime_select helper). I want to access the date elements like date only or time only but I''m just out of ideas. def self.new_meeting(params) str = params[''starts_at(1i)'']
2006 Jul 05
3
PLUGIN newbie: How do I use an installed plugin
All, I''ve downloaded and installed a plugin into my vendor directory. How do I then take advantage of it? It has an init.rb file which has the appropriate require. What do I need to do to make sure that the plugin code gets loaded? Thanks, Wes -- Posted via http://www.ruby-forum.com/.
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 Jul 02
1
DRY? Why select_date and select_date?
Why select_date and select_date? I dont understand why having both (backward compat?). I also look that their source are different, one use the InstanceTag and others calls 3 select_(year, month, day) functions.
2007 Mar 30
0
select_hour and select_minute methods
Is there anything in the mix to add :class, :id etc html_options to the select_hour and select_minute methods? I found this post, http://groups.google.com/group/rubyonrails-talk/msg/fcc4907eee2bfd33?dmode=source, dated late January that touches on the subject. I''m curious if this is an issue in the current rails development. Anyone have any info?
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
2008 Dec 13
0
select_tag and select_date how to change inline font
I have been trying to change the font size in the select_date but i haven''t had any luck here''s what i did: <%= select_date( Date.today, :prefix => ''prom_date_end'', :order => [ :day,:month, :year], :html => {:style => "font-size: xx-small;"}) %> --~--~---------~--~----~------------~-------~--~----~ You received this message because
2006 Dec 08
4
select_date method
Hi Everyone, I used "select_date" method in my application and got 3 select boxes for Date, Month and Year. Code : <td><%= text_field ''content'', ''title'' %></td> <td><%= text_field ''content'', ''description'' %></td> <td><%= select_date %></td>
2005 Aug 15
1
html_options for select_date
As far as I can tell, it''s not possible to use html_options in conjunction with the select_* helpers. This means using them in conjunction with observe_field etc is pretty much impossible. Does anyone have a patch to add this functionality, or know of a workaround? I''m having a look at the moment, but not sure how to get it working without breaking existing stuff. --