$.validator.addMethod( "datenotgreaterthantoday", function(value, element) { var currentDate = new Date(); var selectedDate = new Date(value); return (currentDate >= selectedDate); }, "You cannot select a date greater than today." );