Html 基于ui日期选择器angularjs的值选中/取消选中单选按钮
我正试图按单选按钮设置日期 目前我正在使用下面的代码来检查预定义的最大和最小日期Html 基于ui日期选择器angularjs的值选中/取消选中单选按钮,html,arrays,angularjs,Html,Arrays,Angularjs,我正试图按单选按钮设置日期 目前我正在使用下面的代码来检查预定义的最大和最小日期 tpl.html文件 <uib-datepicker ng-model="dateSelector.endDate" maxdate="dateSelector.maxDate"min-date="dateSelector.minDate" show- weeks="true" class="well well-sm display-inline-block" customclass="dateSelec
<uib-datepicker ng-model="dateSelector.endDate"
maxdate="dateSelector.maxDate"min-date="dateSelector.minDate" show-
weeks="true" class="well well-sm display-inline-block"
customclass="dateSelector.getDayClass(date, mode)"/>
getDayClass: function (date, mode)
{
if (mode === 'day')
{
debugger;
$scope.fcount = $scope.fcount + 1;
console.log($scope.fcount);
if ($scope.dateSelector.startDate && $scope.dateSelector.endDate) {
if (date.setHours(0, 0, 0, 0) >= $scope.dateSelector.startDate.setHours(0, 0, 0, 0) &&
date.setHours(0, 0, 0, 0) <= $scope.dateSelector.endDate.setHours(0, 0, 0, 0)) {
//return 'daterange';
return '';
}
}
}
return '';
}
getDayClass:函数(日期、模式)
{
如果(模式=='day')
{
调试器;
$scope.fcount=$scope.fcount+1;
console.log($scope.fcount);
if($scope.dateSelector.startDate&&$scope.dateSelector.endDate){
if(date.setHours(0,0,0,0)>=$scope.dateSelector.startDate.setHours(0,0,0)&&
date.setHours(0,0,0,0)