Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 基于ui日期选择器angularjs的值选中/取消选中单选按钮_Html_Arrays_Angularjs - Fatal编程技术网

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

我正试图按单选按钮设置日期 目前我正在使用下面的代码来检查预定义的最大和最小日期

  • 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="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)