update from and to date index.html of all report
This commit is contained in:
@@ -151,20 +151,24 @@
|
||||
|
||||
// OK button is clicked
|
||||
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||
$('#from').val(date)
|
||||
new_date = new Date(date) ;
|
||||
month = parseInt(new_date.getMonth()+1)
|
||||
from = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
|
||||
$('#from').val(from)
|
||||
search_by_date();
|
||||
});
|
||||
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||
$('#to').val(date)
|
||||
new_date = new Date(date) ;
|
||||
month = parseInt(new_date.getMonth()+1)
|
||||
to = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
|
||||
$('#to').val(to)
|
||||
search_by_date();
|
||||
});
|
||||
|
||||
function search_by_date(){
|
||||
|
||||
var to_date = new Date($('#to').val());
|
||||
var to = to_date.getDate() + "-" + to_date.getMonth() + "-" + to_date.getFullYear();
|
||||
var from_date = new Date($('#from').val());
|
||||
var from = from_date.getDate() + "-" + from_date.getMonth() + "-" + from_date.getFullYear();
|
||||
from = $("#from").val();
|
||||
to = $("#to").val();
|
||||
|
||||
var period = 0;
|
||||
var period_type = 1;
|
||||
|
||||
Reference in New Issue
Block a user