Sha256: 0ce689fb10bad7af4a3f0171905202f9fe444819ac9765eb47d1e16e3eb6413a
Contents?: true
Size: 812 Bytes
Versions: 11
Compression:
Stored size: 812 Bytes
Contents
$ -> window.setInputDateTime = (field) -> date = $("##{field}_date").val() time = $("##{field}_time").val() $('#' + field).val("#{date} #{time}") window.initPickers = -> $('input.datepicker') .datepicker({format: 'dd.mm.yyyy', language: 'ru', autoclose: true}) .on 'changeDate', (e) -> setInputDateTime($(e.target).data('target')) .on 'show', (e) -> if ($(document).width() - $(e.target).offset().left) < 200 $('.datepicker.dropdown-menu:visible').css({left: "#{$(document).width() - 255}px"}).addClass('right_picker') $('input.timepicker').timepicker({showMeridian: false}).bind 'hidden', (e) -> setInputDateTime($(e.target).data('target')) initPickers() $('.simple_form').bind "nested:fieldAdded", => initPickers()
Version data entries
11 entries across 11 versions & 1 rubygems