Class: MotionPrime::DateFieldSection

Inherits:
BaseFieldSection show all
Defined in:
motion-prime/sections/form/date_field_section.rb

Constant Summary

Constants inherited from Section

Section::DEFAULT_CONTENT_HEIGHT, Section::KEYBOARD_HEIGHT_LANDSCAPE, Section::KEYBOARD_HEIGHT_PORTRAIT

Instance Attribute Summary

Attributes inherited from BaseFieldSection

#form

Attributes included from CellSectionMixin

#pending_display, #table

Attributes inherited from Section

#elements, #model, #name, #options, #screen, #section_styles

Attributes included from DrawSectionMixin

#cached_draw_image, #container_element, #container_gesture_recognizers

Instance Method Summary collapse

Methods inherited from BaseFieldSection

#all_errors, #bind_text_input, #blur, #clear_observers, #container_height, #errors_observer_fields, #focus, #form_name, #has_errors?, #observe_model_errors, #observing_errors?, #observing_errors_for, #on_section_render, #prepare_table_data, #reload_section, #render_element?, #update_height

Methods included from CellSectionMixin

#cell_name, #cell_type, #container_bounds, #display, #init_container_element, #load_container_element, #pending_display!, #render_container, #section_styles

Methods inherited from Section

#add_element, after_initialize, after_render, before_initialize, before_render, bind_keyboard_close, #bind_keyboard_events, #build_element, #cell, container, #container_bounds, #container_height, #container_options, #create_elements, #default_name, element, #element, #elements_options, #elements_to_draw, #elements_to_render, #hide, #hide_keyboard, #initialize, #keyboard_will_hide, #keyboard_will_show, #load_elements, #load_section, #load_section!, #on_keyboard_hide, #on_keyboard_show, #reload_section, #render, #render!, #render_container, #render_element?, #show, #view

Methods included from DrawSectionMixin

#bind_gesture_on_container_for, #container_view, #draw_in, #init_container_element, #load_container_element, #prerender_elements_for_state, #prerender_enabled?, #strong_references

Methods included from FrameCalculatorMixin

#calculate_frome_for

Methods included from HasStyles

#prepare_gradient

Methods included from HasClassFactory

#camelize_factory, #class_factory, #low_camelize_factory

Methods included from HasNormalizer

#normalize_object, #normalize_options

Methods included from HasAuthorization

#api_client, #current_user, #reset_current_user, #user_signed_in?

Constructor Details

This class inherits a constructor from MotionPrime::Section

Instance Method Details

#bind_date_pickerObject



13
14
15
16
17
18
19
20
21
22
# File 'motion-prime/sections/form/date_field_section.rb', line 13

def bind_date_picker
  picker = view(:date_picker)
  picker.setDelegate form
  unless picker.date
    picker.setDate NSDate.date, animated: true
  end
  picker.on :change do
    form.send(options[:action]) if options[:action]
  end
end

#deallocObject



24
25
26
27
28
# File 'motion-prime/sections/form/date_field_section.rb', line 24

def dealloc
  picker = view(:date_picker)
  picker.setDelegate nil
  super
end