$(function() { $.datepicker.setDefaults($.datepicker.regional["ja"]); $("#hoge").datepicker( {//#以下はContact Form 7のフォームのIDを指定 autoSize: true,//テキストボックスの幅を自動設定 dateFormat: 'yy/mm/dd', minDate: '2026/01/10',//上記で判定した翌日・翌々日の日付を指定 maxDate: '2026/02/14',//営業終了日 beforeShowDay : function(date) {//以下、休業日設定をする日付を記載 var dateFormat = 'yy/mm/dd'; var disableDates = ["2026/01/01","2026/01/08","2026/01/15","2026/01/22","2026/01/29","2026/02/05","2026/02/12","2026/02/19","2026/02/26","2026/03/05","2026/03/12","2026/03/19","2026/03/26","2026/04/02","2026/04/09","2026/04/16","2026/04/23","2026/04/30","2026/05/07","2026/05/14","2026/05/21","2026/05/28","2026/06/04","2026/06/11","2026/06/18","2026/06/25","2026/07/02","2026/07/09","2026/07/16","2026/07/23","2026/07/30","2026/08/06","2026/08/13","2026/08/20","2026/08/27","2026/09/03","2026/09/10","2026/09/17","2026/09/24","2026/10/01","2026/10/08","2026/10/15","2026/10/22","2026/10/29","2026/11/05","2026/11/12","2026/11/19","2026/11/26","2026/12/03","2026/12/10","2026/12/17","2026/12/24","2026/12/31","2026/12/29","2026/12/30","2026/12/31","2026/01/01","2026/01/02","2026/01/03","2026/01/04","2026/01/05","2026/01/06","2027/01/01","2027/01/02","2027/01/03","2027/01/04","2027/01/05","2027/01/06","2025/06/04","2025/08/11","2025/08/12","2025/08/13","2025/08/14","2025/08/15","2027/01/07","2027/01/14","2027/01/21","2027/01/28","2027/02/04","2027/02/11","2027/02/18","2027/02/25","2027/03/04","2027/03/11","2027/03/18","2027/03/25","2027/04/01","2027/04/08","2027/04/15","2027/04/22","2027/04/29","2027/05/06","2027/05/13","2027/05/20","2027/05/27","2027/06/03","2027/06/10","2027/06/17","2027/06/24","2027/07/01","2027/07/08","2027/07/15","2027/07/22","2027/07/29","2027/08/05","2027/08/12","2027/08/19","2027/08/26","2027/09/02","2027/09/09","2027/09/16","2027/09/23","2027/09/30","2027/10/07","2027/10/14","2027/10/21","2027/10/28","2027/11/04","2027/11/11","2027/11/18","2027/11/25","2027/12/02","2027/12/09","2027/12/16","2027/12/23","2027/12/30", ]; var disableDate = $.datepicker.formatDate(dateFormat, date); return [( disableDates.indexOf(disableDate) == -1 ), "", "営業日"]; } }); $('#hoge').attr('readonly',true);//#以下はContact Form 7のフォームのIDを指定 }); $(function() { $.datepicker.setDefaults($.datepicker.regional["ja"]); $("#service_date").datepicker( {//#以下はContact Form 7のフォームのIDを指定 autoSize: true,//テキストボックスの幅を自動設定 dateFormat: 'yy/mm/dd', minDate: '2026/01/15',//上記で判定した翌日・翌々日の日付を指定 maxDate: '2026/02/14',//営業終了日 beforeShowDay : function(date) {//以下、休業日設定をする日付を記載 var dateFormat = 'yy/mm/dd'; var disableDates = ["2026/01/01","2026/01/08","2026/01/15","2026/01/22","2026/01/29","2026/02/05","2026/02/12","2026/02/19","2026/02/26","2026/03/05","2026/03/12","2026/03/19","2026/03/26","2026/04/02","2026/04/09","2026/04/16","2026/04/23","2026/04/30","2026/05/07","2026/05/14","2026/05/21","2026/05/28","2026/06/04","2026/06/11","2026/06/18","2026/06/25","2026/07/02","2026/07/09","2026/07/16","2026/07/23","2026/07/30","2026/08/06","2026/08/13","2026/08/20","2026/08/27","2026/09/03","2026/09/10","2026/09/17","2026/09/24","2026/10/01","2026/10/08","2026/10/15","2026/10/22","2026/10/29","2026/11/05","2026/11/12","2026/11/19","2026/11/26","2026/12/03","2026/12/10","2026/12/17","2026/12/24","2026/12/31","2026/12/29","2026/12/30","2026/12/31","2026/01/01","2026/01/02","2026/01/03","2026/01/04","2026/01/05","2026/01/06","2027/01/01","2027/01/02","2027/01/03","2027/01/04","2027/01/05","2027/01/06","2025/06/04","2025/06/04","2025/08/11","2025/08/12","2025/08/13","2025/08/14","2025/08/15","2027/01/07","2027/01/14","2027/01/21","2027/01/28","2027/02/04","2027/02/11","2027/02/18","2027/02/25","2027/03/04","2027/03/11","2027/03/18","2027/03/25","2027/04/01","2027/04/08","2027/04/15","2027/04/22","2027/04/29","2027/05/06","2027/05/13","2027/05/20","2027/05/27","2027/06/03","2027/06/10","2027/06/17","2027/06/24","2027/07/01","2027/07/08","2027/07/15","2027/07/22","2027/07/29","2027/08/05","2027/08/12","2027/08/19","2027/08/26","2027/09/02","2027/09/09","2027/09/16","2027/09/23","2027/09/30","2027/10/07","2027/10/14","2027/10/21","2027/10/28","2027/11/04","2027/11/11","2027/11/18","2027/11/25","2027/12/02","2027/12/09","2027/12/16","2027/12/23","2027/12/30", ]; var disableDate = $.datepicker.formatDate(dateFormat, date); return [( disableDates.indexOf(disableDate) == -1 ), "", "営業日"]; } }); $('#hoge').attr('readonly',true);//#以下はContact Form 7のフォームのIDを指定 });