How To Disable WeekEnd Dates in JQuery UI Datepicker?
Jun 19, 2020
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...
- How to Show Loading Spinner in JQuery?
- How to Create Ajax Submit Form Using jQuery?
- How To Get Current Page URL, Path, Host and hash using jQuery?
- How To Get, Set and Delete Div Background Image jQuery?
- JQuery Remove All Unwanted Whitespace From String Example
- Body Background Video Using Vide Jquery Example
- JQuery UI Autocomplete Example
- JQuery Split String By Comma Into Array Example