     $("input[type='datetime']").each -> enableDatetimePicker @
     $("input[type='daterange']").each -> enableDateRangePicker @
 
-) jQuery
+) ekylibre, jQuery

(($) ->
# Options

  baseDateOptions = ($element) => $.extend {},
    locale: getLocale($element)
    dateFormat: 'Y-m-d'

      .flatpickr options

  # Watch for element insertion via javascript
  E.onDOMElementAdded
    "input[type='date']": ($element) => $element.each -> enableDatePicker @
    "input[type='datetime']": ($element) => $element.each -> enableDatetimePicker @
    "input[type='daterange']": ($element) => $element.each -> enableDateRangePicker @

  # Initializes date fields
  $(document).ready =>
