$(document).ready(function() {
var today = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate());
$('#id_date').data("DateTimePicker").maxDate(today);
});