Sha256: 49144b35b1e81f0f3f59374f5a2cc346f5f68d03391f73aac6ae453582d2f8b2
Contents?: true
Size: 1.67 KB
Versions: 13
Compression:
Stored size: 1.67 KB
Contents
I"¦(function() { var loadDatePicker, loadDatetimePicker, loadTimePicker, setDatePickerOptions, setPickerOptions; loadDatePicker = function() { return $("input.datepicker").each(function(i) { var defOpts; defOpts = { altFormat: "yy-mm-dd", altField: $(this).next(), changeYear: true, changeMonth: true }; return setDatePickerOptions(this, defOpts); }); }; loadTimePicker = function() { return $("input.timepicker").each(function(i) { var defOpts; defOpts = { timeOnly: true, altField: $(this).next(), altFieldTimeOnly: false, defaultValue: this.value }; return setPickerOptions(this, defOpts); }); }; loadDatetimePicker = function() { return $("input.datetimepicker").each(function(i) { var defOpts; defOpts = { altField: $(this).next(), altFieldTimeOnly: false, altFormat: "yy-mm-dd", altTimeFormat: "HH:mm" }; return setPickerOptions(this, defOpts); }); }; Window.bindHDPickers = function() { loadDatePicker(); loadTimePicker(); return loadDatetimePicker(); }; $(document).on('ready page:load', function() { return Window.bindHDPickers(); }); setPickerOptions = function(input, defOpts) { var allOpts, userOpts; userOpts = $(input).data(); allOpts = $.extend({}, defOpts, userOpts); return $(input).datetimepicker(allOpts); }; setDatePickerOptions = function(input, defOpts) { var allOpts, userOpts; userOpts = $(input).data(); allOpts = $.extend({}, defOpts, userOpts); return $(input).datepicker(allOpts); }; }).call(this); :ET
Version data entries
13 entries across 5 versions & 1 rubygems