In this tutorial, we will learn JQuery UI Datepicker Disable Future Dates Example

You will learn how to disable dates after today's datepicker in jquery UI. disable date for today's next date using datepicker in jquery UI.

Here I will give you a full example for disabling dates after today's datepicker in jquery UI.


Example:

<!DOCTYPE html>
<html>
<head>
    <title>jquery ui datepicker disable dates after today</title>
</head>
<link href="http://code.jquery.com/ui/1.9.2/themes/smoothness/jquery-ui.css" rel="stylesheet" />
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<body>
<h2>JQuery UI DatePicker Disable Dates After Today</h2>
<p>Date: <input type="text" id="datepicker" /></p>

<script type="text/javascript">
    $(function() {
        $( "#datepicker" ).datepicker({  maxDate: new Date() });
    });
</script>
</body>
</html>

May this example help you.