Class: DatepickerInput

Inherits:
ActiveAdmin::Inputs::DatepickerInput
  • Object
show all
Defined in:
app/inputs/datepicker_input.rb

Instance Method Summary collapse

Instance Method Details

#input_html_optionsObject

Override the HTML options to better work with the date picker and nil values.



3
4
5
# File 'app/inputs/datepicker_input.rb', line 3

def input_html_options
  super.merge(value: (object.send(method) || Time.zone.now).strftime("%B %e, %Y").gsub(/\s\s/, " "))
end