发表于: 2017-05-09 23:41:23
1 843
今天完成的事:
填坑任务8留下的时间插件的坑
直接上代码
1 //初始化查询条件
2 $scope.newWordQueryObj = {
3 fileName: '',
4 startTime: new Date(CommonServ.getLastMonthDate()),
5 endTime: new Date(CommonServ.getCurDate()),
6 order: '0'
7 };
8
9
10 //时间选择器配置
11 //$scope.minStartDate = 0; //开始时间的最小时间
12 //$scope.maxStartDate = $scope.newWordQueryObj.endTime; //开始时间的最大可选时间
13 //$scope.minEndDate = $scope.newWordQueryObj.startTime; //结束时间的最小可选时间要大于开始时间的设定值
14 //$scope.maxEndDate = $scope.newWordQueryObj.endTime; //结束时间的最大可选择时间不超过结束时间的设定值
15 $scope.startDateOptions = {
16 formatYear: 'yy',
17 maxDate: $scope.newWordQueryObj.endTime,
18 startingDay: 1
19 };
20 $scope.endDateOptions = {
21 formatYear: 'yy',
22 minDate: $scope.newWordQueryObj.startTime,
23 maxDate: new Date(),
24 startingDay: 1
25 };
26
27 $scope.$watch('newWordQueryObj.startTime', function(newValue,oldValue){
28 //$scope.minEndDate = newValue;
29 $scope.endDateOptions.minDate = newValue;
30 });
31 $scope.$watch('newWordQueryObj.endTime', function(newValue,oldValue){
32 //$scope.maxStartDate = newValue;
33 $scope.startDateOptions.maxDate = newValue;
34 });
35 $scope.startOpen = function() {
36 $timeout(function() {
37 $scope.startPopupOpened = true;
38 });
39 };
40 $scope.endOpen = function() {
41 $timeout(function() {
42 $scope.endPopupOpened = true;
43 });
44 };
45 $scope.startPopupOpened = false;
46 $scope.endPopupOpened = false;
学习使用text angular富文本编辑器
明天计划的事:
日常进行任务
遇到的问题:
时间插件之前用的JQ插件,获取时间搓很麻烦,所以就空着了,今天发现angular -bootstrap 时间插件果断回去填了坑,很好用。
收获:
学会使用时间插件
评论