Permalink
Browse files

Make datepicker use correct month name

Fixes #1602

Clean up relateddayNames and dayNamesMin variables in admin.js.erb too
  • Loading branch information...
radar committed May 26, 2012
1 parent a864a6a commit 2695235dc1b35d00a5d88380260d6199a78aeef7
Showing with 3 additions and 3 deletions.
  1. +3 −3 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",

0 comments on commit 2695235

Please sign in to comment.