Sha256: 6d74a5eaf84d6483e5e8cd0ecdf228fcda426fe8b7d96c5dfad84d214f00c6a3
Contents?: true
Size: 922 Bytes
Versions: 18
Compression:
Stored size: 922 Bytes
Contents
window.Alchemy = {} if typeof(window.Alchemy) is 'undefined' $.extend Alchemy, Datepicker: (scope) -> $.datetimepicker.setLocale(Alchemy.locale); $datepicker_inputs = $('input[data-datepicker-type]', scope) # Initializes the datepickers on the text inputs and sets the proper type # to enable browsers default datepicker if the current OS is iOS. if Alchemy.isiOS $datepicker_inputs.prop "type", -> return $(this).data('datepicker-type') else $datepicker_inputs.each -> type = $(this).data('datepicker-type') options = format: Alchemy.t("formats.#{type}") timepicker: /time/.test(type) datepicker: /date/.test(type) dayOfWeekStart: Alchemy.t('formats.start_of_week') onSelectDate: -> Alchemy.setElementDirty $(this).closest(".element-editor") $(this).datetimepicker(options) return
Version data entries
18 entries across 18 versions & 1 rubygems