Permalink
Browse files

Datepicker: Make use of Calendar widget icons option

Fix missing classes options defaults in tests.
  • Loading branch information...
1 parent d7939fa commit ea6c475da43abf3ef0148b45c358ce43e35cd0af @fnagel fnagel committed Apr 16, 2016
Showing with 12 additions and 2 deletions.
  1. +11 −1 tests/unit/datepicker/common.js
  2. +1 −1 ui/widgets/datepicker.js
View
12 tests/unit/datepicker/common.js
@@ -8,10 +8,20 @@ common.testWidget( "datepicker", {
defaults: {
appendTo: null,
buttons: [],
- classes: {},
+ classes: {
+ "ui-calendar": "ui-corner-all",
+ "ui-calendar-header-first": "ui-corner-left",
+ "ui-calendar-header-last": "ui-corner-right",
+ "ui-calendar-prev": "ui-corner-all",
+ "ui-calendar-next": "ui-corner-all"
+ },
disabled: false,
dateFormat: { date: "short" },
eachDay: $.noop,
+ icons: {
+ prevButton: "ui-icon-circle-triangle-w",
+ nextButton: "ui-icon-circle-triangle-e"
+ },
labels: {
"datePickerRole": "date picker",
"nextText": "Next",
View
2 ui/widgets/datepicker.js
@@ -57,7 +57,7 @@ var widget = $.widget( "ui.datepicker", {
},
calendarOptions: [ "buttons", "classes", "disabled", "dateFormat", "eachDay",
- "labels", "locale", "max", "min", "numberOfMonths", "showWeek" ],
+ "icons", "labels", "locale", "max", "min", "numberOfMonths", "showWeek" ],
_create: function() {
this.suppressExpandOnFocus = false;

0 comments on commit ea6c475

Please sign in to comment.