Created
April 13, 2023 09:15
-
-
Save hayskytech/8f40c3f150dd57781a79ba80373714bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="text" /> | |
<script type="text/javascript" src="https://code.jquery.com/jquery-3.4.1.js"></script> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script> | |
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/redmond/jquery-ui.css"> | |
<script type="text/javascript"> | |
var array = ["2019-12-23","2013-03-15","2013-03-16"]; | |
var dateToday = new Date(); | |
$('input').datepicker({ | |
// defaultDate: "+1w", | |
changeMonth: true, | |
minDate: dateToday, | |
beforeShowDay: function(date){ | |
var string = jQuery.datepicker.formatDate('yy-mm-dd', date); | |
return [ array.indexOf(string) == -1 ] | |
} | |
}); | |
// $('input').datepicker({ defaultDate: '+1w' }); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment