Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make datepicker use correct month name

Fixes #1602

Clean up relateddayNames and dayNamesMin variables in admin.js.erb too
  • Loading branch information...
commit 2695235dc1b35d00a5d88380260d6199a78aeef7 1 parent a864a6a
@radar radar authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 core/app/assets/javascripts/admin/admin.js.erb
View
6 core/app/assets/javascripts/admin/admin.js.erb
@@ -208,9 +208,9 @@ $(".observe_field").live('change', function() {
handle_date_picker_fields = function(){
$('.datepicker').datepicker({
dateFormat: "<%= ::I18n.t(:format, :scope => 'spree.date_picker', :default => 'yy/mm/dd') %>",
- dayNames: ["<%= ::I18n.t(:day_names, :scope => :date).join('","') %>"],
- dayNamesMin: ["<%= ::I18n.t(:abbr_day_names, :scope => :date).join('","') %>"],
- monthNames: ["<%= ::I18n.t(:month_names, :scope => :date).join('","') %>"],
+ dayNames: <%= ::I18n.t(:day_names, :scope => :date).to_json %>,
+ dayNamesMin: <%= ::I18n.t(:abbr_day_names, :scope => :date).to_json %>,
+ monthNames: <%= (::I18n.t(:month_names, :scope => :date).delete_if(&:blank?)).to_json %>,
prevText: '<%= ::I18n.t(:previous) %>',
nextText: '<%= ::I18n.t(:next) %>',
showOn: "button",
Please sign in to comment.
Something went wrong with that request. Please try again.