]> source.dussan.org Git - jquery-ui.git/commitdiff
Datepicker: Properly define default for `dateFormat` option
authorFelix Nagel <info@felixnagel.com>
Sat, 26 Apr 2014 12:44:31 +0000 (14:44 +0200)
committerScott González <scott.gonzalez@gmail.com>
Thu, 29 Jan 2015 22:48:25 +0000 (17:48 -0500)
ui/datepicker.js

index 2722c37b6f84af8a662803a32982465eb0034a5f..df45444478377d3b8d2b235d8d46d5d3b3e90b98 100644 (file)
@@ -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;