Subversion Repositories SmartDukaan

Rev

Rev 23884 | Rev 23889 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23884 Rev 23886
Line 25... Line 25...
25
	}
25
	}
26
</style>
26
</style>
27
<script>
27
<script>
28
	$(function() {
28
	$(function() {
29
 
29
 
30
    	var start = moment().subtract(29, 'days');
30
    	var start = startDate || moment().subtract(29, 'days');
31
    	var end = moment();
31
    	var end = endDate || moment();
32
    	console.log(start);
32
    	$('#saleDuration').daterangepicker(getRangedDatePicker(true), datePickerCallback);
33
    	console.log(end);
-
 
34
 
33
 
35
    	function cb(start, end) {
-
 
36
        	$('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
-
 
37
   	 	}
-
 
38
 
-
 
39
    	$('#reportrange').daterangepicker({
-
 
40
        	startDate: start,
-
 
41
        	endDate: end,
-
 
42
        	alwaysShowCalendars: true,
-
 
43
        	ranges: {
-
 
44
	           'Today': [moment(), moment()],
-
 
45
	           'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
-
 
46
	           'Last 7 Days': [moment().subtract(6, 'days'), moment()],
-
 
47
	           'Last 30 Days': [moment().subtract(29, 'days'), moment()],
-
 
48
	           'This Month': [moment().startOf('month'), moment().endOf('month')],
-
 
49
	           'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
-
 
50
        	}
-
 
51
    	}, cb);
-
 
52
 
-
 
53
    	cb(start, end);
-
 
54
    
34
    
55
	});
35
	});
56
	
-
 
57
	$(function() {
-
 
58
    	$('input[name="startDateTime"]').daterangepicker({
-
 
59
    		"showDropdowns": true,
-
 
60
    		"singleDatePicker": true,
-
 
61
    		"startDate": moment(),
-
 
62
    		"autoUpdateInput": true,
-
 
63
    		locale: {
-
 
64
    			format: 'DD/MM/YYYY'
-
 
65
  			}
-
 
66
	    });
-
 
67
	    
-
 
68
	    $('input[name="endDateTime"]').daterangepicker({
-
 
69
	    	"showDropdowns": true,
-
 
70
    		"singleDatePicker": true,
-
 
71
    		"startDate": moment()
-
 
72
    		"autoUpdateInput": true,
-
 
73
    		locale: {
-
 
74
    			cancelLabel: 'Clear',
-
 
75
    			format: 'DD/MM/YYYY'
-
 
76
  			}
-
 
77
	    });
-
 
78
	});
-
 
79
</script>
36
</script>
80
 
37
 
81
<section class="wrapper">            
38
<section class="wrapper">            
82
	<div class="row">
39
	<div class="row">
83
		<div class="col-lg-12">
40
		<div class="col-lg-12">
Line 108... Line 65...
108
             	</select>
65
             	</select>
109
        	</div>
66
        	</div>
110
        	<div class="col-lg-3">
67
        	<div class="col-lg-3">
111
            	<input type="text" class="form-control" id="sale-history-search-text"" placeholder="Search by" value="" />
68
            	<input type="text" class="form-control" id="sale-history-search-text"" placeholder="Search by" value="" />
112
        	</div>
69
        	</div>
113
        	<div class="col-md-2">
70
        	<div class="col-lg-3">
114
				<div class="input-group">
-
 
115
					<input class="form-control" placeholder="Start Date Time" id="startDateTime" name="startDateTime" type="text" value="">
-
 
116
				</div>
-
 
117
			</div>
-
 
118
			<div class="col-md-2">
-
 
119
				<div class="input-group">
71
				<div class="input-group">
120
					<input class="form-control" placeholder="End Date Time" id="endDateTime" name="endDateTime" type="text" value="">
72
					<input class="form-control" placeholder="Sale Period" id="saleDuration" type="text" value="">
121
				</div>
73
				</div>
122
			</div>
74
			</div>
123
			<div class="col-md-1">
75
			<div class="col-lg-1">
124
              	<button class="btn btn-primary submit" id="sale-history-search-button" type="button">Search</button>
76
              	<button class="btn btn-primary submit" id="sale-history-search-button" type="button">Search</button>
125
			</div>
77
			</div>
126
        			
78
        			
127
       	</div>
79
       	</div>
128
   	</div>
80
   	</div>