Datepickerは表示する日付を制限できます。例:上の動画のように、本日から1カ月先まで
minDate:0,
maxDate: “+1M”
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>jQuery UI</title>
<link rel="stylesheet" href="jquery-ui.min.css">
<script src="./external/jquery/jquery.js"></script>
<script src="jquery-ui.min.js"></script>
<style>
.ui-selected {
background: red;
}
</style>
</head>
<body>
<input type="text" id="datepicker">
<script>
$(function(){
$('#datepicker').datepicker({
dateFormat: "yy-mm-dd",
minDate:0,
maxDate: "+1M"
});
});
</script>
</body>
</html>
dialog
<body>
<button>open!</button>
<div id="msg">こんにちは。
</div>
<script>
$(function(){
$('button').click(function(){
$('#msg').dialog('open');
});
$('#msg').dialog({
autoOpen: false,
buttons: {
"ok": function (){
$(this).dialog('close');
}
},
title: "title",
modal: true
});
});
</script>
</body>