/* Japanese initialisation for the jQuery UI date picker plugin. */ /* Written by Kentaro SATO (kentaro@ranvis.com). */ (function( factory ) { if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. define([ "../datepicker" ], factory ); } else { // Browser globals factory( jQuery.datepicker ); } }(function( datepicker ) { datepicker.regional['ja'] = { closeText: '閉じる', prevText: '<前', nextText: '次>', currentText: '今日', monthNames: ['1月','2月','3月','4月','5月','6月', '7月','8月','9月','10月','11月','12月'], monthNamesShort: ['1月','2月','3月','4月','5月','6月', '7月','8月','9月','10月','11月','12月'], dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'], dayNamesShort: ['日','月','火','水','木','金','土'], dayNamesMin: ['日','月','火','水','木','金','土'], weekHeader: '週', dateFormat: 'yy/mm/dd', firstDay: 0, isRTL: false, showMonthAfterYear: true, yearSuffix: '年'}; datepicker.setDefaults(datepicker.regional['ja']); return datepicker.regional['ja']; })); $(function() { var holidays = ['2026/7/1', '2026/7/8', '2026/7/9', '2026/7/15', '2026/7/16', '2026/7/22', '2026/7/29', '2026/8/5', '2026/8/12', '2026/8/13', '2026/8/19', '2026/8/26', '2026/9/2', '2026/9/9', '2026/9/10', '2026/9/16', '2026/9/17', '2026/9/24', '2026/9/30', '2026/10/7', '2026/10/8', '2026/10/14', '2026/10/15', '2026/10/21', '2026/10/28', '2026/11/4', '2026/11/11', '2026/11/12', '2026/11/18', '2026/11/19', '2026/11/25', '2026/12/2', '2026/12/9', '2026/12/10', '2026/12/16', '2026/12/23', '2026/12/26', '2026/12/27', '2026/12/28', '2026/12/29', '2026/12/30', '2026/12/31']; $("#datepicker, .datepicker").datepicker({ dateFormat: "yy/mm/dd", minDate: 1, maxDate: "+55d", firstDay: 0, beforeShowDay: function(date) { var result; var dd = date.getFullYear() + "/" + (date.getMonth() + 1) + "/" + date.getDate(); switch (date.getDay()) { case 0: //日曜日 result = [true, "date-holiday"]; break; case 6: //土曜日 result = [true, "date-saturday"]; break; default: result = [true]; break; } if (holidays.indexOf(dd) != -1) { result = [false]; } return result; } }); });