{"id":4500,"date":"2023-06-27T21:32:35","date_gmt":"2023-06-27T12:32:35","guid":{"rendered":"http:\/\/www.lining-moon.casa\/andplus.co.jp_230822_230809\/?p=4500"},"modified":"2026-01-08T11:13:43","modified_gmt":"2026-01-08T02:13:43","slug":"post-4500","status":"publish","type":"post","link":"https:\/\/code-plus.jp\/gp\/post-4500\/","title":{"rendered":"MTS Simple Booking\u306e\u300cday-calendar\u300d\u306b\u3001\u65e5\u4ed8\u3084\u66dc\u65e5\u540d\u30af\u30e9\u30b9\u3092\u8ffd\u52a0\u3059\u308b\u30ab\u30b9\u30bf\u30de\u30a4\u30ba"},"content":{"rendered":"<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001HTML \u30af\u30e9\u30b9\u3092 MTS Simple Booking \u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u8ffd\u52a0\u3059\u308b\u30d7\u30ed\u30bb\u30b9\u3092\u8aac\u660e\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u4e88\u7d04\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u5916\u89b3\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u305f\u308a\u3001\u7279\u5b9a\u306e\u6a5f\u80fd\u3092\u8ffd\u52a0\u3057\u305f\u308a\u3059\u308b\u5834\u5408\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n\n<h2>1:\u30b3\u30fc\u30c9\u3092\u7406\u89e3\u3059\u308b<\/h2>\n<p>MTS Simple Booking \u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001PHP \u3092\u4f7f\u7528\u3057\u3066\u4e88\u7d04\u30ab\u30ec\u30f3\u30c0\u30fc\u3092\u751f\u6210\u3057\u307e\u3059\u3002\u30ab\u30ec\u30f3\u30c0\u30fc\u5185\u306e\u65e5\u4ed8\u306f\u3001<code>&lt;td&gt;<\/code>\u30af\u30e9\u30b9\u306e\u8981\u7d20\u306b\u3088\u3063\u3066\u8868\u3055\u308c\u307e\u3059\u3002\n  <code>day-box<\/code>\u8981\u7d20\u5185\u306b\u306f\u3001\u5404\u65e5\u306e\u30ea\u30f3\u30af\u3092\u8868\u3059\u30af\u30e9\u30b9\u3092\u6301\u3064\u8981\u7d20<code>&lt;td&gt;<\/code>\u304c\u3042\u308a\u307e\u3059\u3002\n<\/p>\n<p>&nbsp;<\/p>\n\n<h2>2: calendar-daylink \u306b\u30a4\u30d9\u30f3\u30c8\u30ea\u30b9\u30ca\u30fc\u3092\u8ffd\u52a0\u3059\u308b<\/h2>\n<p>\u30af\u30ea\u30c3\u30af\u30a4\u30d9\u30f3\u30c8\u3092\u5404<code>calendar-daylink<\/code>\u8981\u7d20\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002\u8981\u7d20\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001<code>calendar-daylink<\/code>\u306e\u89aa\u8981\u7d20\u306e\u30af\u30e9\u30b9\u304c sessionStorage \u306b\u4fdd\u5b58\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n\n<p>JavaScript\u30b3\u30fc\u30c9\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<pre class=\"language-javascript\"><code>\n(function() {\n  window.addEventListener('load', function() {\n    var dayLinks = document.querySelectorAll('.calendar-daylink');\n    for (var i = 0; i < dayLinks.length; i++) {\n      dayLinks[i].addEventListener('click', function(event) {\n        var parentClass = event.target.parentNode.parentNode.className;\n        var classWithoutDayBox = parentClass.replace('day-box', '').trim();\n        sessionStorage.setItem('day-class', classWithoutDayBox);\n      });\n    }\n  });\n})();\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n\n<h2>3: Storage\u30af\u30e9\u30b9\u3092\u53d6\u5f97\u3057\u3066\u3001day-calendar\u306b\u8ffd\u52a0\u3059\u308b<\/h2>\n<p>\u6b21\u306b\u3001\u5225\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u30ed\u30fc\u30c9\u30a4\u30d9\u30f3\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002\u3053\u306e\u30a4\u30d9\u30f3\u30c8\u306f\u3001\u4fdd\u5b58\u3055\u308c\u305f\u30af\u30e9\u30b9\u3092 sessionStorage \u304b\u3089\u53d6\u5f97\u3057\u3001\u305d\u308c\u3092<code>day-calendar<\/code>\u30af\u30e9\u30b9\u3092\u6301\u3064\u3059\u3079\u3066\u306e\u8981\u7d20\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n\n<p>JavaScript\u30b3\u30fc\u30c9\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<pre class=\"language-javascript\"><code>\n(function () {\n  window.addEventListener('load', function () {\n    var dayClass = sessionStorage.getItem('day-class');\n    if (dayClass) {\n      var dayClasses = dayClass.split(' ');\n      var dayCalendars = document.querySelectorAll('.day-calendar');\n      for (var i = 0; i < dayCalendars.length; i++) {\n        dayCalendars[i].classList.add(...dayClasses);\n      }\n    }\n  });\n})();\n<\/code><\/pre>\n\n<h2>\u7d50\u8ad6<\/h2>\n<p>\u4ee5\u4e0a\u3067\u3059\uff01HTML \u30af\u30e9\u30b9\u304c MTS Simple Booking \u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u6b63\u5e38\u306b\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u4e88\u7d04\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u5916\u89b3\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u305f\u308a\u3001\u7279\u5b9a\u306e\u6a5f\u80fd\u3092\u8ffd\u52a0\u3057\u305f\u308a\u3067\u304d\u307e\u3059\u3002\u5909\u66f4\u3092\u5b9f\u969b\u306eWeb\u30b5\u30a4\u30c8\u306b\u9069\u7528\u3059\u308b\u524d\u306b\u3001\u5fc5\u305a\u5b89\u5168\u306a\u74b0\u5883\u3067\u30c6\u30b9\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>","protected":false},"excerpt":{"rendered":"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001HTML \u30af\u30e9\u30b9\u3092 MTS Simple Booking \u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u8ffd\u52a0\u3059\u308b\u30d7\u30ed\u30bb\u30b9\u3092\u8aac\u660e\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u4e88\u7d04\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u5916\u89b3\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u305f\u308a\u3001\u7279\u5b9a\u306e\u6a5f\u80fd\u3092\u8ffd\u52a0\u3057\u305f\u308a\u3059\u308b\u5834\u5408\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002 [...]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","footnotes":"","vk-ltc-link":"","vk-ltc-target":""},"categories":[12],"tags":[],"group":[],"pg":[],"class_list":["post-4500","post","type-post","status-publish","format-standard","category-javascript"],"acf":[],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts\/4500","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/comments?post=4500"}],"version-history":[{"count":0,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts\/4500\/revisions"}],"wp:attachment":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/media?parent=4500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/categories?post=4500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/tags?post=4500"},{"taxonomy":"group","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/group?post=4500"},{"taxonomy":"pg","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/pg?post=4500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}