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