<%= ActiveScaffold::Bridges::DatePickerBridge.localization %> $(document).ready(function() { $('input.date_picker').live('focus', function(event) { var date_picker = $(this); if (typeof(date_picker.datepicker) == 'function') { if (!date_picker.hasClass('hasDatepicker')) { date_picker.datepicker(); date_picker.trigger('focus'); } } return true; }); $('input.datetime_picker').live('focus', function(event) { var date_picker = $(this); if (typeof(date_picker.datetimepicker) == 'function') { if (!date_picker.hasClass('hasDatepicker')) { date_picker.datetimepicker(); date_picker.trigger('focus'); } } return true; }); });