Author: Hugo Melo <hugo@riseup.net>
Avoid issue with json being escaped on date picker
%!v(PANIC=String method: strings: negative Repeat count)
diff --git a/plugins/orders/views/orders_plugin/shared/daterangepicker/_init.html.slim b/plugins/orders/views/orders_plugin/shared/daterangepicker/_init.html.slim index dbedab3b6c88df55fd6b446dbe6fc5d78889316f..fc78af36f496e5959890d945b1468c7d2d97d8af 100644 --- a/plugins/orders/views/orders_plugin/shared/daterangepicker/_init.html.slim +++ b/plugins/orders/views/orders_plugin/shared/daterangepicker/_init.html.slim @@ -6,7 +6,7 @@ = 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_json}) + moment.locale("#{I18n.locale.downcase.to_s}") orders.daterangepicker.defaultOptions = { autoApply: true,