From: Felix Nagel Date: Sat, 26 Apr 2014 12:44:31 +0000 (+0200) Subject: Datepicker: Properly define default for `dateFormat` option X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ab2cb90240a484d83bb456e35c22d06ad9c16f5b;p=jquery-ui.git Datepicker: Properly define default for `dateFormat` option --- diff --git a/ui/datepicker.js b/ui/datepicker.js index 2722c37b6..df4544447 100644 --- a/ui/datepicker.js +++ b/ui/datepicker.js @@ -39,7 +39,7 @@ var idIncrement = 0, $.widget( "ui.datepicker", { options: { appendTo: null, - dateFormat: null, + dateFormat: { date: "short" }, // TODO review eachDay: $.noop, numberOfMonths: 1, @@ -59,7 +59,6 @@ $.widget( "ui.datepicker", { }, _create: function() { - this.options.dateFormat = this.options.dateFormat || { date: "short" }; this.date = $.date( null, this.options.dateFormat ); this.date.eachDay = this.options.eachDay;