Class: IRuby::Input::Date

Inherits:
Field show all
Defined in:
lib/iruby/input/date.rb

Instance Method Summary collapse

Methods inherited from Field

#widget_html

Methods inherited from Label

#widget_label

Methods inherited from Widget

builder, #content, #widget_display, #widget_html, #widget_join

Instance Method Details

#widget_cssObject



11
12
13
# File 'lib/iruby/input/date.rb', line 11

def widget_css
  '#ui-datepicker-div { z-index: 2000; }'
end

#widget_jsObject



15
16
17
18
19
20
21
22
23
# File 'lib/iruby/input/date.rb', line 15

def widget_js 
  <<-JS
    $('.iruby-date').datepicker({
      onClose: function(date) {
        $('.iruby-date').data('iruby-value', date);
      }  
    });
  JS
end