How To Disable WeekEnd Dates in JQuery UI Datepicker?

Jqury UI

Nicesnippets

601

19-06-2020


How To Disable WeekEnd Dates in JQuery UI Datepicker?

Hi Guys,

I am going to explain you how to disable week end dates in datepcker using jquery ui. We will disable weekend dates using jquery,

If you need disable weekend dates in datepicker using jquery ui then you can use this example.

Example :


<!DOCTYPE html>

<html>

<head>

<title>How To Disable WeekEnd Dates in JQuery UI Datepicker? - NiceSnippets.com</title>

<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>

<style type="text/css">

.container{

border-radius: 5px;

padding:50px 20px;

margin:150px auto;

width:25%;

border:2px solid #000;

text-align: center;

}

input{

padding:5px;

}

</style>

</head>

<body>

<h4 style="text-align: center;">How To Disable WeekEnd Dates in JQuery UI Datepicker? - NiceSnippets.com</h4>

<div class="container">

<label>Date :</label>

<input type='text' class='date'>

</div>

<script type="text/javascript">

$(document).ready(function () {

$(".date").datepicker({

beforeShowDay: $.datepicker.noWeekends

});

});

</script>

</body>

</html>

It will help you...