diff options
Diffstat (limited to 'ui/widgets/calendar.js')
-rw-r--r-- | ui/widgets/calendar.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/widgets/calendar.js b/ui/widgets/calendar.js index ba45c1c84..006332d1b 100644 --- a/ui/widgets/calendar.js +++ b/ui/widgets/calendar.js @@ -646,7 +646,8 @@ return $.widget( "ui.calendar", { if ( arguments.length ) { this.valueAsDate( this._parse( value ) ); } else { - return this._format( this.option( "value" ) ); + return this.option( "value" ) === null ? + null : this._format( this.option( "value" ) ); } }, @@ -716,9 +717,9 @@ return $.widget( "ui.calendar", { if ( key === "value" ) { if ( this._isValid( value ) ) { this.date.setTime( value.getTime() ); - this._super( key, value ); + } else { + value = null; } - return; } if ( key === "max" || key === "min" ) { |