function deadlinePassedCheck(e){
    // If the deadline is in the past, asks for a confirmation
    deadline = document.getElementById("id_deadline_date").valueAsDate;
    deadline_time = document.getElementById("id_deadline_time").value;
    today = new Date();
    deadline.setHours(deadline_time.substring(0,2));
    deadline.setMinutes(deadline_time.substring(3));

    if(deadline < today){
        console.log("passé,"+today);
        if(confirm("La date limite de commande est dans le passé. Voulez-vous vraiment continuer ?") == false){
            e.preventDefault();
        };
    };
};
