Method: Tolaria::FormBuildable#timestamp_field

Defined in:
lib/tolaria/form_buildable.rb

#timestamp_field(method, options = {}) ⇒ Object

Returns a text field that allows the user to input a date and time. Automatically validates itself and recovers to a template if blanked out. This field uses moment.js to parse the date and set the values on a set of hidden Rails datetime_select fields. Options are forwarded to the hidden datetime_select group.



95
96
97
98
99
100
101
# File 'lib/tolaria/form_buildable.rb', line 95

def timestamp_field(method, options = {})
  render(partial:"admin/shared/forms/timestamp_field", locals: {
    f: self,
    method: method,
    options: options,
  })
end