diff --git a/angularjs-datetime-picker.js b/angularjs-datetime-picker.js index e86247d..c039d9e 100644 --- a/angularjs-datetime-picker.js +++ b/angularjs-datetime-picker.js @@ -232,7 +232,11 @@ var month = scope.month ? (scope.month-1) : today.getMonth(); var day = scope.day || today.getDate(); var hour = scope.hour || today.getHours(); - var minute = scope.minute || today.getMinutes(); + if(scope.minute == 0){ + var minute = 0 + } else{ + var minute = scope.minute || today.getMinutes(); + } scope.selectedDate = new Date(year, month, day, hour, minute, 0); } scope.inputHour = scope.selectedDate.getHours();