diff --git a/src/picker.js b/src/picker.js
index <HASH>..<HASH> 100644
--- a/src/picker.js
+++ b/src/picker.js
@@ -221,7 +221,7 @@ angular.module("ion-datetime-picker", ["ionic"])
                     } else
                     if ($scope.onlyValid.before){
 
-                        var beforeDate = createDate($scope.onlyValid.after);
+                        var beforeDate = createDate($scope.onlyValid.before);
 
                         if ($scope.onlyValid.inclusive) {
                             isValid = currentDate <= beforeDate;
Fix unable to select before date.