class DatePicker::Styles::Pickadate
Public Instance Methods
mapping()
click to toggle source
# File lib/date_picker/styles/pickadate.rb, line 7 def mapping() :pickadate end
template()
click to toggle source
# File lib/date_picker/styles/pickadate.rb, line 10 def template() %{ <%= input_html %> <script> (function($) { var type = '<%= type %>', plugin = 'picka' + type, options = $.extend(true, {}, <%= picker_options %>, { monthsFull: <%= month_names.to_json %>, monthsShort: <%= abbr_month_names.to_json %>, weekdaysFull: <%= day_names.to_json %>, weekdaysShort: <%= abbr_day_names.to_json %>, format: '<%= picker_format %>', formatSubmit: '<%= data_format %>', hiddenName: true, min: <%= min ? 'new Date("' + min.to_s + '")' : 'undefined' %>, max: <%= max ? 'new Date("' + max.to_s + '")' : 'undefined' %> }), $element = $('#<%= input_id %>'), picker = $element[plugin] && $element[plugin](options)[plugin]('picker'); })(jQuery); </script> } end
types()
click to toggle source
# File lib/date_picker/styles/pickadate.rb, line 4 def types [:date, :time] end