cirandas.net

ref: master

plugins/orders/views/orders_plugin/shared/daterangepicker/_init.html.slim


= content_for :head do
  = stylesheet_link_tag '/assets/plugins/orders/stylesheets/daterangepicker.css'
  / in case it is not loaded for this theme
  = stylesheet_link_tag 'designs/icons/awesome/scss/font-awesome.css'
  = javascript_include_tag '/assets/plugins/orders/javascripts/moment-with-locales.js'
  = javascript_include_tag '/assets/plugins/orders/javascripts/daterangepicker.js'

javascript:
  moment.locale("#{I18n.locale.downcase.to_s}")

  orders.daterangepicker.defaultOptions = {
    autoApply:           true,
    timePicker24Hour:    true,
    timePickerIncrement: 15,
    separator:           #{" #{I18n.t'orders_plugin.lib.date_helper.to'} ".to_json},
    locale: {
      format:           'LLLL',
      applyLabel:       #{_('OK').to_json},
      cancelLabel:      #{_('Cancel').to_json},
      daysOfWeek:       #{I18n.t('date.abbr_day_names').to_json},
      monthNames:       #{I18n.t('date.month_names')[1..-1].to_json},
    },
  }