Questions tagged [datetime-select]

23 questions
15
votes
7 answers

What Does ActiveRecord::MultiparameterAssignmentErrors Mean?

I have a rails form with a datetime_select field. When I try to submit the form, I get the following exception: ActiveRecord::MultiparameterAssignmentErrors in WidgetsController#update 1 error(s) on assignment of multiparameter attributes If it's…
Jason Wadsworth
  • 933
  • 1
  • 10
  • 18
7
votes
1 answer

form_for with datetime_select

I am using Rails 3.1 and first time using datetime_select. I want to specify the minute select box to have 15 minute intervals rather than 1 minute intervals: <%= f.datetime_select :start_datetime, :ampm => true, :start_minute => [0,15,30,45]…
timpone
  • 19,235
  • 36
  • 121
  • 211
6
votes
3 answers

Rails 3: datetime_select with am/pm options

In Rails 3, is there a way to use datetime_select and display hours showing 12 hour am/pm options rather than 24-hour options?
Drew Johnson
  • 18,973
  • 9
  • 32
  • 35
4
votes
6 answers

Ruby on Rails time_select plugins?

Does anybody know any Ruby on Rails time_select plugins that have only one select box? So the select box has entries like "9:00 AM", "9:15 AM", etc.? I have seen a few plugins, but nothing like this. Thanks!
Tony
  • 18,776
  • 31
  • 129
  • 193
2
votes
1 answer

Problem with Time zone configuration Rails 3

I've been having some problems with the configuration of timezone. So I've seen some posts/questions about this topic and some say I should add the following configuration in the "application.rb". config.time_zone = "Brasilia" I've done that, but…
2
votes
1 answer

Rails datetime_select month names not showing internationalization

I am having a problem with datetime_select month rails view control. After integrating new localization to my website (bs_BA) Bosnian, I have a problem where names of months not showing correctly. This is my view control with slim syntax: =…
Nezir
  • 6,727
  • 12
  • 54
  • 78
2
votes
1 answer

Limiting datetime_select to a certain start time

Is there a way to limit datetime_select in rails so that it only shows certain hours, e.g. so that the only options are 5pm-10pm? currently only have this:` <%= f.label :time %>
<%= f.datetime_select :time, :minute_step => 30 %>`
Sofanisba
  • 39
  • 4
2
votes
1 answer

An alternative to useing datetime_select in Rails

I'm not such a fan of using datetime_select. I think it renders ugly and isn't easy to deal with on post back. How do most people deal with it? Wouldn't it be easier to use a plain textbox and use javascript to validate the input as a date? I will…
CountCet
  • 4,545
  • 7
  • 30
  • 39
2
votes
2 answers

How can I modify the input type of the Rails datetime_select helper?

I am using the Rails helper datetime_select in one of my forms. I currently have a requirement to change the dropdowns for day, year, hour, and minute to be textboxes with validation. Is there a way I can specify that I want textboxes for these…
Russ Bradberry
  • 10,705
  • 17
  • 69
  • 85
1
vote
0 answers

f.datetime_select remove previous dropdown dates

I'm having a problem formatting the form_for helper f.datetime_select in ruby on rails. What I want to do is only show future dates. I'm already doing the correct validation, but I want to eliminate the confusion of a user having the ability to…
1
vote
1 answer

How to match daily data from monthly using Matlab?

I have montly macroeconomic data series and I am planning to use them for a weekly (every Monday) regression analysis. How can I match a data point which release once a month to my date template( 4 times during that month) since the new point…
Karamos
  • 49
  • 3
0
votes
1 answer

datetime_select in Sinatra

I've developed a website in Sinatra, but at the last minute I've been told it will need a form with a datetime field (for an Activerecord object). In Rails I would just use the datetime_select helper to construct this field in the view, but I'm…
0
votes
1 answer

SQL to_char() | Convert minutes into a string of size 2

Using postgres, I am trying to convert minutes to a string consisting of two characters. For example, if the code outputs 0, I want to convert this to '00'. EXTRACT(TIMEZONE_MINUTE FROM CURRENT_TIMESTAMP) I've tried this so far but it adds a space…
Mistakamikaze
  • 446
  • 3
  • 19
0
votes
1 answer

Problem: how to get a list of tag attribute values with beautifulsoup

I want to scrape from the website of a local cinema and get all times, when a certain film is running. I found the table in which the times are listed in the following form: []. If I use…
0
votes
1 answer

rails refreshing date in datetime_select option

First of all I'm new to the HTML and RAILS coding. But as a part of learning experience, I've designed a machine reservation system for the lab I'm working in. I've a form (show.html.erb) to view a machine details like name, ipaddress etc. below…
1
2