diff --git a/src/datepicker/datepicker.js b/src/datepicker/datepicker.js
index c75e22917b..2048e41957 100644
--- a/src/datepicker/datepicker.js
+++ b/src/datepicker/datepicker.js
@@ -217,7 +217,7 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.position'])
scope.select = function( date ) {
if ( mode === 0 ) {
- var dt = new Date( ngModel.$modelValue );
+ var dt = ngModel.$modelValue ? new Date( ngModel.$modelValue ) : new Date(0, 0, 0, 0, 0, 0, 0);
dt.setFullYear( date.getFullYear(), date.getMonth(), date.getDate() );
ngModel.$setViewValue( dt );
refill( true );
diff --git a/src/datepicker/test/datepicker.spec.js b/src/datepicker/test/datepicker.spec.js
index 6ed390b9d4..7707857375 100644
--- a/src/datepicker/test/datepicker.spec.js
+++ b/src/datepicker/test/datepicker.spec.js
@@ -1294,26 +1294,31 @@ describe('datepicker directive', function () {
});
});
});
-});
-describe('datepicker directive with empty initial state', function () {
- var $rootScope, element;
- beforeEach(module('ui.bootstrap.datepicker'));
- beforeEach(module('template/datepicker/datepicker.html'));
- beforeEach(inject(function(_$compile_, _$rootScope_) {
- $compile = _$compile_;
- $rootScope = _$rootScope_;
- $rootScope.date = null;
- element = $compile('