You can simply do this
$(function() {
$( "#datepicker" ).datepicker({ maxDate: new Date });
});
FYI: while checking the documentation, found that it also accepts numeric values too.
Number: A number of days from today. For example 2 represents two days from today and -1 represents yesterday.
so 0
represents today. Therefore you can do this too
$( "#datepicker" ).datepicker({ maxDate: 0 });