$(function() { var target_days = [ '2023/11/23', '2023/12/29', '2023/12/30', '2023/12/31', '2024/01/01', '2024/01/02', '2024/01/03', '2024/01/04', '2024/01/08', '2024/02/11', '2024/02/12', '2024/02/23', '2024/03/20', '2024/04/29', '2024/05/03', '2024/05/04', '2024/05/05', '2024/05/06', '2024/07/15', '2024/08/11', '2024/08/12', '2024/09/16', '2024/09/22', '2024/09/23', '2024/10/14', '2024/11/03', '2024/11/04', '2024/11/23', '2025/01/01', '2025/01/13', '2025/02/11', '2025/02/23', '2025/02/24', '2025/03/20', '2025/04/29', '2025/05/03', '2025/05/04', '2025/05/05', '2025/05/06', '2025/07/21', '2025/08/11', '2025/09/15', '2025/09/23', '2025/10/13', '2025/11/03', '2025/11/23', '2025/11/24', '2026/01/01', '2026/01/12', '2026/02/11', '2026/02/23', '2026/03/20', '2026/04/29', '2026/05/03', '2026/05/04', '2026/05/05', '2026/05/06', '2026/07/20', '2026/08/11', '2026/09/21', '2026/09/22', '2026/09/23', '2026/10/12', '2026/11/03', '2026/11/23', '2027/01/01', '2027/01/11', '2027/02/11', '2027/02/23', '2027/03/21', '2027/03/22', '2027/04/29', '2027/05/03', '2027/05/04', '2027/05/05', '2027/07/19', '2027/08/11', '2027/09/20', '2027/09/23', '2027/10/11', '2027/11/03', '2027/11/23', '2028/01/01', '2028/01/10', '2028/02/11', '2028/02/23', '2028/03/20', '2028/04/29', '2028/05/03', '2028/05/04', '2028/05/05', '2028/07/17', '2028/08/11', '2028/09/18', '2028/09/22', '2028/10/09', '2028/11/03', '2028/11/23', '2029/01/01', '2029/01/08', '2029/02/11', '2029/02/12', '2029/02/23', '2029/03/20', '2029/04/29', '2029/04/30', '2029/05/03', '2029/05/04', '2029/05/05', '2029/07/16', '2029/08/11', '2029/09/17', '2029/09/23', '2029/09/24', '2029/10/08', '2029/11/03', '2029/11/23', '2030/01/01', '2030/01/14', '2030/02/11', '2030/02/23', '2030/03/20', '2030/04/29', '2030/05/03', '2030/05/04', '2030/05/05', '2030/05/06', '2030/07/15', '2030/08/11', '2030/08/12', '2030/09/16', '2030/09/23', '2030/10/14', '2030/11/03', '2030/11/04', '2030/11/23', '2031/01/01', '2031/01/13', '2031/02/11', '2031/02/23', '2031/02/24', '2031/03/21', '2031/04/29', '2031/05/03', '2031/05/04', '2031/05/05', '2031/05/06', '2031/07/21', '2031/08/11', '2031/09/15', '2031/09/23', '2031/10/13', '2031/11/03', '2031/11/23', '2031/11/24', '2032/01/01', '2032/01/12', '2032/02/11', '2032/02/23', '2032/03/20', '2032/04/29', '2032/05/03', '2032/05/04', '2032/05/05', '2032/07/19', '2032/08/11', '2032/09/20', '2032/09/21', '2032/09/22', '2032/10/11', '2032/11/03', '2032/11/23', '2033/01/01', '2033/01/10', '2033/02/11', '2033/02/23', '2033/03/20', '2033/03/21', '2033/04/29', '2033/05/03', '2033/05/04', '2033/05/05', '2033/07/18', '2033/08/11', '2033/09/19', '2033/09/23', '2033/10/10', '2033/11/03', '2033/11/23', '2034/01/01', '2034/01/02', '2034/01/09', '2034/02/11', '2034/02/23', '2034/03/20', '2034/04/29', '2034/05/03', '2034/05/04', '2034/05/05', '2034/07/17', '2034/08/11', '2034/09/18', '2034/09/23', '2034/10/09', '2034/11/03', '2034/11/23', '2035/01/01', '2035/01/08', '2035/02/11', '2035/02/12', '2035/02/23', '2035/03/21', '2035/04/29', '2035/04/30', '2035/05/03', '2035/05/04', '2035/05/05', '2035/07/16', '2035/08/11', '2035/09/17', '2035/09/23', '2035/09/24', '2035/10/08', '2035/11/03', '2035/11/23', '2036/01/01', '2036/01/14', '2036/02/11', '2036/02/23', '2036/03/20', '2036/04/29', '2036/05/03', '2036/05/04', '2036/05/05', '2036/05/06', '2036/07/21', '2036/08/11', '2036/09/15', '2036/09/22', '2036/10/13', '2036/11/03', '2036/11/23', '2036/11/24', ]; var enddate = new Date; enddate.setMonth(enddate.getMonth() + 3, 0); $(".calendarset").datepicker({ dateFormat: "yy年mm月dd日", minDate: "3d", maxDate: enddate, beforeShowDay: function(date) { var day = date.getDay(); var yymmdd = $.datepicker.formatDate("yy/mm/dd", date); if ($.inArray(yymmdd, target_days) != -1) { return [false, ""]; } return [(day != 0 && day != 4 )]; } }); });