Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
fix(datepicker): set to null if not present
Browse files Browse the repository at this point in the history
Closes #4014
  • Loading branch information
sccheruku authored and wesleycho committed Jul 24, 2015
1 parent c727da8 commit a65a5fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/datepicker/datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi
if (angular.isDefined(dt)) {
scope.date = dt;
}
var date = scope.date ? dateFilter(scope.date, dateFormat) : '';
var date = scope.date ? dateFilter(scope.date, dateFormat) : null; // Setting to NULL is necessary for form validators to function
element.val(date);
ngModel.$setViewValue(date);

Expand Down

0 comments on commit a65a5fa

Please sign in to comment.