From ea6c475da43abf3ef0148b45c358ce43e35cd0af Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Sat, 16 Apr 2016 18:47:43 +0200 Subject: [PATCH] Datepicker: Make use of Calendar widget icons option Fix missing classes options defaults in tests. --- tests/unit/datepicker/common.js | 12 +++++++++++- ui/widgets/datepicker.js | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) 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; -- 2.39.5