similar to: Accessing datetime elements from hash passed to method

Displaying 20 results from an estimated 3000 matches similar to: "Accessing datetime elements from hash passed to method"

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
2011 Aug 09
4
Nesting select and text_field in radio_button
I''m creating my first Rails app and need an idea creating forms. I have Meeting model with place attribute. I want to have two fields for Meeting.place = one would be select with places from other meetings or text_field if the place is being used first time. User would be selecting radio_button of which field he has used. So is there any way to nest select and text_field within 2
2006 Jan 20
47
SQL Server datetime error
i have a problem with the datetime format of rails. i am unable to save a dataset to the db. here''s the error message -- the original error message was in german, so i translated it -- i get: DBI::DatabaseError: Execute OLE error code:80040E07 in Microsoft OLE DB Provider for SQL Server Couldn''t convert a char-Datatype to datetime HRESULT error code:0x80020009
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
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
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.
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 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 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
2006 Apr 07
2
Access instance variables from model?
Can I make my model methods aware of the context (preferably instance variables) where they are run, without having to pass them arguments? The app in question should be time zone aware, so something like user.events[0].starts_in should check against @logged_in_user.now rather than Time.now. I could send the user as an argument (user.events[0].starts_in(:timezoned => @logged_in_user)),
2013 Feb 04
1
Subfolders problem
I have moved from dovecot 1.x to 2.x and I have big problem with subfolders. When I'm moving subfolder with other subfolders is moving only main subfolder, without subfolders, example : mail-storage-1 /var/vmail/home/adamskitest/mdbox/mailboxes # find | egrep -e "janusz|jarek" ./jarek ./jarek/dbox-Mails ./jarek/dbox-Mails/dovecot.index.log ./jarek/jarek2 ./jarek/jarek2/dbox-Mails
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},
2005 Apr 27
2
noob question: rhtml new/edit views and the date functionality
Hello All, I''ve been playing with Rails - did the recipe/category sample from onLamp.com - fairly straight forward - even got it working against postgres. Anyway, I''ve been appling rails to a small test project and I can''t seem to get the syntax down or find a sample of how to use the date control on a custom new/edit view. The CRUD (is that right?) that automatically
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
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 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
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 Oct 04
6
Animation of Mandelbrot Set
Hi, I was playing with Mandelbrot sets and come up with the following code, I thought I would share: library(fields) # for tim.colors library(caTools) # for write.gif m = 400 # grid size C = complex( real=rep(seq(-1.8,0.6, length.out=m), each=m ), imag=rep(seq(-1.2,1.2, length.out=m), m ) ) C = matrix(C,m,m) Z = 0 X = array(0, c(m,m,20)) for (k in 1:20) { Z =