I'm not really 100% sure this is what you're looking for without any code to base this answer on, but hopefully this will give you a hint as to how to accomplish what you want.
So if you want to create a very simple date range picker, you can take advantage of the min-date attribute, which points to a bindable expression. This means that whenever the parent scope property changes, the corresponding isolated scope property of the datepicker also changes, and vice versa. Therefore, if you bind the min-date attribute of the "end date" datepicker to the model for the "start date" datepicker, whenever the start date is changed, the second datepicker will be updated to reflect the change.
<datepicker ng-model="startdt" show-weeks="false"></datepicker>
<datepicker ng-model="enddt" min-date="startdt" show-weeks="false"></datepicker>
To make things a little nicer for the user, you could further watch the start date and automatically update the end date in the event that the selected start date is greater than the currently selected end date.
$scope.$watch('startdt', function(newval){
if (newval > $scope.enddt) {
$scope.enddt = newval;
}
});
To further improve usability, if you're using UI Bootstrap 0.13.0+, you can use the custom-class attribute to set a custom CSS class on the date range. As an example of this, you could add:
Markup
//Bind the custom-class attribute to the setRangeClass function
<datepicker ng-model="enddt" min-date="startdt" custom-class="setRangeClass(date, mode)" show-weeks="false"></datepicker>
Controller
//Define the setRangeClass on the controller
$scope.setRangeClass = function(date, mode) {
if (mode === 'day') {
var dayToCheck = new Date(date).setHours(0,0,0,0);
var startDay = new Date($scope.startdt).setHours(0,0,0,0);
var endDay = new Date($scope.enddt).setHours(0,0,0,0);
if (dayToCheck >= startDay && dayToCheck < endDay) {
return 'range';
}
}
return '';
};
CSS
/*Create the corresponding .range class*/
.range>.btn-default {
background-color: #5bb75b;
}
.range button span {
color: #fff;
font-weight: bold;
}