Created
February 13, 2014 23:23
-
-
Save endash/8986106 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.$watch('[min, max]', function (vals) { | |
var min = vals[0], max = vals[1], date = $scope.date; | |
var start = moment(date), | |
end = moment(date); | |
start.hour(min/60); | |
start.minute(min % 60); | |
end.hour(max/60); | |
end.minute(max % 60); | |
$scope.selectedRange = moment().range(start, end); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment