Datepicker: Properly define default for dateFormat option

This commit is contained in:
Felix Nagel 2014-04-26 14:44:31 +02:00 committed by Scott González
parent 9c66d2e92f
commit ab2cb90240

View File

@ -39,7 +39,7 @@ var idIncrement = 0,
$.widget( "ui.datepicker", { $.widget( "ui.datepicker", {
options: { options: {
appendTo: null, appendTo: null,
dateFormat: null, dateFormat: { date: "short" },
// TODO review // TODO review
eachDay: $.noop, eachDay: $.noop,
numberOfMonths: 1, numberOfMonths: 1,
@ -59,7 +59,6 @@ $.widget( "ui.datepicker", {
}, },
_create: function() { _create: function() {
this.options.dateFormat = this.options.dateFormat || { date: "short" };
this.date = $.date( null, this.options.dateFormat ); this.date = $.date( null, this.options.dateFormat );
this.date.eachDay = this.options.eachDay; this.date.eachDay = this.options.eachDay;