goku2 asked:

Time form helper

Is there a rails datetime_select like form helper for nitro? Or some similar control to set a Time property?

If i have this model:

class Person
  property :name, String
  property :dob, Time
end
and in the controller i ‘m using the assing method to populate the object:
class AppController < Nitro::Controller
  def create
    @new_person = Person.assing(request)
    if request.post?
            if @new_person.valid?
              @new_person.save
      end
    end
  end
end
It would be ideal to have a control like the RoR one:
datetime_select("new_person", "dob", :start_year => 1980, 
:use_month_numbers => true, :discard_minute => true, 
:include_blank => true)
Or something like that.. And not having to write selects for year, month, day, hour and minute. :D

(1 attempts)

Fabian answered:

Could you give us an example on how you want it to work?

Rating: 3