Skip to content

Commit ea6c475

Browse files
committed
Datepicker: Make use of Calendar widget icons option
Fix missing classes options defaults in tests.
1 parent d7939fa commit ea6c475

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

tests/unit/datepicker/common.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,20 @@ common.testWidget( "datepicker", {
88
defaults: {
99
appendTo: null,
1010
buttons: [],
11-
classes: {},
11+
classes: {
12+
"ui-calendar": "ui-corner-all",
13+
"ui-calendar-header-first": "ui-corner-left",
14+
"ui-calendar-header-last": "ui-corner-right",
15+
"ui-calendar-prev": "ui-corner-all",
16+
"ui-calendar-next": "ui-corner-all"
17+
},
1218
disabled: false,
1319
dateFormat: { date: "short" },
1420
eachDay: $.noop,
21+
icons: {
22+
prevButton: "ui-icon-circle-triangle-w",
23+
nextButton: "ui-icon-circle-triangle-e"
24+
},
1525
labels: {
1626
"datePickerRole": "date picker",
1727
"nextText": "Next",

ui/widgets/datepicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ var widget = $.widget( "ui.datepicker", {
5757
},
5858

5959
calendarOptions: [ "buttons", "classes", "disabled", "dateFormat", "eachDay",
60-
"labels", "locale", "max", "min", "numberOfMonths", "showWeek" ],
60+
"icons", "labels", "locale", "max", "min", "numberOfMonths", "showWeek" ],
6161

6262
_create: function() {
6363
this.suppressExpandOnFocus = false;

0 commit comments

Comments
 (0)