日期控件
2017-11-01 本文已影响2人
麦壳儿UIandFE2
1:ng后台系统使用的时间控件是:
2:判断日期开始时间是否比结束时间大
image.png
3:事例代码:
//加载
$scope.query = function() {
//判断日期开始时间是否比结束时间大
if ($scope.data.createBegintime > $scope.data.createEndtime) {
toastr.error("开始时间比结束时间大,请选择正确的时间范围!");
return;
}
$scope.progressbar.start();
var params = {
"pageIndex": parseInt($scope.PageIndex),
"pageSize": parseInt($scope.PageSize),
"condition": {
"startTime": $rootScope.tools.dateToTimetamp($scope.data.createBegintime, 0),
"endTime": $rootScope.tools.dateToTimetamp($scope.data.createEndtime, 0),
"qNickName": $scope.data.qNickName,
"rNickName": $scope.data.rNickName,
"questionType": 1 //专家类型
}
};
$scope.getExpertQuestionsPromise = restful.fetch("ask/get", "POST", params).then(function(res) {
if (res.success) {
$scope.getExpertQuestionsList = res.data.data;
$scope.getExpertQuestionsCount = res.data.count;
$scope.toPageNum = $scope.PageIndex;
} else {
toastr.error(res.msg, "获取专家问题列表数据失败信息");
}
$scope.progressbar.complete();
}, function(rej) {
toastr.error("失败状态码:" + rej.status + ",失败信息:" + httpStatusTip(rej.status), "请求失败");
});
};
$scope.query();