function set_date(){
    var date = new Date();
var day = date.getDate();
var month = date.getMonth() + 1;
var year = date.getFullYear();

if (month < 10) month = "0" + month;
if (day < 10) day = "0" + day;

var today = day + "-" + month + "-" + year;
 $('.date_class,.today').val(today);

 var last = new Date(date.getTime() - (2 * 24 * 60 * 60 * 1000)); 
var day =last.getDate();
var month=last.getMonth()+1;
var year=last.getFullYear();
if (month < 10) month = "0" + month;
if (day < 10) day = "0" + day;

var today = day + "-" + month + "-" + year; 
 $('.7date_class').val(today);
}


 $(function() {
 $('.date_class').datetimepicker({
timepicker:false,
 date: new Date(),
format:'d-m-Y',
formatDate:'d-m-Y',
closeOnDateSelect:true
});
            });