From: Felix Nagel Date: Sat, 16 Apr 2016 16:47:43 +0000 (+0200) Subject: Datepicker: Make use of Calendar widget icons option X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ea6c475da43abf3ef0148b45c358ce43e35cd0af;p=jquery-ui.git Datepicker: Make use of Calendar widget icons option Fix missing classes options defaults in tests. --- diff --git a/tests/unit/datepicker/common.js b/tests/unit/datepicker/common.js index bc06a8992..9074b78e6 100644 --- a/tests/unit/datepicker/common.js +++ b/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", diff --git a/ui/widgets/datepicker.js b/ui/widgets/datepicker.js index b48ea1cce..95bc0aa33 100644 --- a/ui/widgets/datepicker.js +++ b/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;