{"id":7,"date":"2024-06-11T19:17:02","date_gmt":"2024-06-11T17:17:02","guid":{"rendered":"http:\/\/localhost\/Roessli-Baechli.ch\/wordpress\/?page_id=7"},"modified":"2026-01-13T21:11:13","modified_gmt":"2026-01-13T21:11:13","slug":"ev","status":"publish","type":"page","link":"https:\/\/roessli-baechli.ch\/index.php\/ev\/","title":{"rendered":"Veranstaltungen"},"content":{"rendered":"\n<h2 class=\"wp-block-heading has-text-align-center\">Es ist immer was los im B\u00e4chli<\/h2>\n\n\n\n<h2 class=\"wp-block-heading has-text-align-center\">Flyer<\/h2>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"746\" height=\"1058\" data-id=\"545\" src=\"https:\/\/roessli-baechli.ch\/wp-content\/uploads\/2026\/01\/preisjassen2026-pdf.jpg\" alt=\"\" class=\"wp-image-545\" srcset=\"https:\/\/roessli-baechli.ch\/wp-content\/uploads\/2026\/01\/preisjassen2026-pdf.jpg 746w, https:\/\/roessli-baechli.ch\/wp-content\/uploads\/2026\/01\/preisjassen2026-pdf-212x300.jpg 212w, https:\/\/roessli-baechli.ch\/wp-content\/uploads\/2026\/01\/preisjassen2026-pdf-722x1024.jpg 722w\" sizes=\"auto, (max-width: 746px) 100vw, 746px\" \/><\/figure>\n<\/figure>\n\n\n    <div id=\"event-calendar\">\r\n        <div class=\"calendar-navigation\">\r\n                            <button id=\"prev-month\">Vorheriger Monat<\/button>\r\n                <span id=\"calendar-title\">April 2026<\/span>\r\n                <button id=\"next-month\">N\u00e4chster Monat<\/button>\r\n                    <\/div>\r\n        <div id=\"calendar-grid\">\r\n            <div class='calendar-weekdays'><div class='weekday'>Montag<\/div><div class='weekday'>Dienstag<\/div><div class='weekday'>Mittwoch<\/div><div class='weekday'>Donnerstag<\/div><div class='weekday'>Freitag<\/div><div class='weekday'>Samstag<\/div><div class='weekday'>Sonntag<\/div><\/div><div class='calendar-days'><div class='calendar-day empty'><\/div><div class='calendar-day empty'><\/div><div class='calendar-day'><span class='day'>1<\/span><\/div><div class='calendar-day'><span class='day'>2<\/span><\/div><div class='calendar-day'><span class='day'>3<\/span><\/div><div class='calendar-day'><span class='day'>4<\/span><\/div><div class='calendar-day'><span class='day'>5<\/span><\/div><div class='calendar-day'><span class='day'>6<\/span><\/div><div class='calendar-day'><span class='day'>7<\/span><\/div><div class='calendar-day'><span class='day'>8<\/span><\/div><div class='calendar-day'><span class='day'>9<\/span><\/div><div class='calendar-day'><span class='day'>10<\/span><\/div><div class='calendar-day'><span class='day'>11<\/span><\/div><div class='calendar-day'><span class='day'>12<\/span><\/div><div class='calendar-day'><span class='day'>13<\/span><\/div><div class='calendar-day'><span class='day'>14<\/span><\/div><div class='calendar-day'><span class='day'>15<\/span><\/div><div class='calendar-day'><span class='day'>16<\/span><\/div><div class='calendar-day'><span class='day'>17<\/span><\/div><div class='calendar-day'><span class='day'>18<\/span><\/div><div class='calendar-day'><span class='day'>19<\/span><\/div><div class='calendar-day'><span class='day'>20<\/span><\/div><div class='calendar-day'><span class='day'>21<\/span><\/div><div class='calendar-day'><span class='day'>22<\/span><\/div><div class='calendar-day'><span class='day'>23<\/span><\/div><div class='calendar-day'><span class='day'>24<\/span><\/div><div class='calendar-day'><span class='day'>25<\/span><\/div><div class='calendar-day'><span class='day'>26<\/span><\/div><div class='calendar-day'><span class='day'>27<\/span><\/div><div class='calendar-day'><span class='day'>28<\/span><\/div><div class='calendar-day'><span class='day'>29<\/span><\/div><div class='calendar-day'><span class='day'>30<\/span><\/div><\/div> <\/div>\r\n    <\/div>\r\n\r\n    <script>\r\n        document.addEventListener('DOMContentLoaded', function() {\r\n            let currentMonth = 04;\r\n            let currentYear = 2026;\r\n\r\n            document.getElementById('prev-month').addEventListener('click', function() {\r\n                currentMonth--;\r\n                if (currentMonth < 1) {\r\n                    currentMonth = 12;\r\n                    currentYear--;\r\n                }\r\n                updateCalendar(currentYear, currentMonth);\r\n            });\r\n\r\n            document.getElementById('next-month').addEventListener('click', function() {\r\n                currentMonth++;\r\n                if (currentMonth > 12) {\r\n                    currentMonth = 1;\r\n                    currentYear++;\r\n                }\r\n                updateCalendar(currentYear, currentMonth);\r\n            });\r\n\r\n            function updateCalendar(year, month) {\r\n\r\n                if (month < 1 || month > 12) { \/\/ Verwende nur JavaScript-Variablen\r\n                    console.error('Invalid month:', month);\r\n                    return;\r\n                } else {\r\n                    console.log('Year: ' + year + ' Month: ' + month);\r\n                }\r\n\r\n                const xhr = new XMLHttpRequest();\r\n                xhr.open('POST', 'https:\/\/roessli-baechli.ch\/wp-admin\/admin-ajax.php', true);\r\n                xhr.setRequestHeader('Content-Type', 'application\/x-www-form-urlencoded');\r\n                xhr.onload = function() {\r\n                    if (xhr.status === 200) {\r\n                        document.getElementById('calendar-grid').innerHTML = xhr.responseText;\r\n                        document.getElementById('calendar-title').textContent = new Date(year, month - 1).toLocaleString('de-DE', {\r\n                            month: 'long',\r\n                            year: 'numeric'\r\n                        });\r\n                    }\r\n                };\r\n                xhr.send('action=update_calendar&year=' + year + '&month=' + month);\r\n            }\r\n        });\r\n    <\/script>\r\n\n","protected":false},"excerpt":{"rendered":"<p>Es ist immer was los im B\u00e4chli Flyer<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-site.php","meta":{"footnotes":""},"class_list":["post-7","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/roessli-baechli.ch\/index.php\/wp-json\/wp\/v2\/pages\/7","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/roessli-baechli.ch\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/roessli-baechli.ch\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/roessli-baechli.ch\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/roessli-baechli.ch\/index.php\/wp-json\/wp\/v2\/comments?post=7"}],"version-history":[{"count":12,"href":"https:\/\/roessli-baechli.ch\/index.php\/wp-json\/wp\/v2\/pages\/7\/revisions"}],"predecessor-version":[{"id":546,"href":"https:\/\/roessli-baechli.ch\/index.php\/wp-json\/wp\/v2\/pages\/7\/revisions\/546"}],"wp:attachment":[{"href":"https:\/\/roessli-baechli.ch\/index.php\/wp-json\/wp\/v2\/media?parent=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}