{"id":11936,"date":"2025-01-30T17:52:13","date_gmt":"2025-01-30T16:52:13","guid":{"rendered":"https:\/\/dsmhqr1wpi.onrocket.site\/?p=11936"},"modified":"2025-01-30T17:52:13","modified_gmt":"2025-01-30T16:52:13","slug":"floridacaltest","status":"publish","type":"post","link":"https:\/\/migflug.com\/ru\/%d0%b1%d0%bb%d0%be%d0%b3\/floridacaltest\/","title":{"rendered":"FloridaCalTest"},"content":{"rendered":"    <div style=\"display:none;\">MiGFlug DatePicker Version 1.3.6<\/div>\n\n    <div class=\"datepicker-container\" style=\"position: relative\">\n        <div class=\"datepicker-availability\" id=\"datepicker_69d27e35a93c9\"><\/div>\n    <\/div>\n    <script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/luxon\/3.4.3\/luxon.min.js\"><\/script>\n    <script type=\"text\/javascript\">\n        jQuery(document).ready(function ($) {\n            const { DateTime } = luxon;\n            const timezone = \"Europe\/Zurich\";\n            var disabledDays = [];\n            const appointmentId = \"13664206\";\n            const calendarId = \"2621637\";\n            const expirationTime = 60 * 60 * 1000;\n\n            let today = DateTime.now().setZone(timezone);\n            let maxDate = today.plus({ years: 3 });\n\n            const debouncedFetchDisabledDates = debounce(fetchDisabledDates, 300);\n\n            $(\"#datepicker_69d27e35a93c9\").datepicker({\n                changeMonth: true,\n                changeYear: true,\n                showOtherMonths: true,\n                selectOtherMonths: true,\n                yearRange: \"c-10:c+10\",\n                dateFormat: \"yy-dd-mm\",\n                minDate: 0,\n                maxDate: new Date(maxDate.year, maxDate.month - 1, maxDate.day),\n                monthNames: [\n                    \"January\", \"February\", \"March\", \"April\", \"May\", \"June\",\n                    \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"\n                ],\n                monthNamesShort: [\n                    \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\",\n                    \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"\n                ],\n                onSelect: function (dateText) {\n                    let parsedDate = $.datepicker.parseDate('yy-dd-mm', dateText);\n                    let finalDate = $.datepicker.formatDate('yy-mm-dd', parsedDate);\n\n                    let bookingURL = \"https:\/\/www.migflug.com\/bookingv2\";\n                    let popup_id = \"\";\n\n                    if (bookingURL !== \"\") {\n                        let fullURL = bookingURL + \"?datechoice=now&date=\" + finalDate +\n                            \"&region=\" + \"americas\" +\n                            \"&product=\" + \"\" +\n                            \"&eulocation=\" + \"\" +\n                            \"&uslocation=\" + \"USA-FL-L39\" +\n                            \"&referrer=\" + \"pdpdatepicker\" +\n                            \"&itlocation=\" + \"\" +\n                            \"&apaclocation=\" + \"\";\n                        window.open(fullURL, '_blank');\n                        showAvailableDay();\n                    } else if (popup_id !== \"\") {\n                        PUM.open('#' + popup_id);\n                        showAvailableDay();\n                    }\n                },\n                beforeShow: function () {\n                    showAvailableDay();\n                },\n                beforeShowDay: function (date) {\n                    const localDt = DateTime.fromJSDate(date).setZone(timezone, { keepLocalTime: true });\n                    const dateToCheck = localDt.toFormat('yyyy-MM-dd');\n                    const isAvailable = disabledDays.includes(dateToCheck);\n                    return [isAvailable];\n                },\n                onChangeMonthYear: function (year, month) {\n                    debouncedFetchDisabledDates(year, month);\n                }\n            });\n\n            showAvailableDay();\n\n            function fetchDisabledDates(year, month, retryCount = 0) {\n                const cacheKey = `disabledDates_${calendarId}_${appointmentId}_${year}_${month}_${timezone}`;\n                const now = Date.now();\n                const yearMonth = year + '-' + (\"0\" + month).slice(-2);\n                const maxRetries = 3;\n\n                if (localStorage.getItem(cacheKey)) {\n                    const cachedData = JSON.parse(localStorage.getItem(cacheKey));\n                    if (cachedData && cachedData.expiration > now) {\n                        updateDisabledDates(cachedData.response);\n                        fetchDataForNextMonth(year, month);\n                        return;\n                    }\n                }\n\n                $.ajax({\n                    url: 'https:\/\/migflug.com\/wp-admin\/admin-ajax.php',\n                    method: 'GET',\n                    data: {\n                        action: 'datepicker_fetch_disabled_dates',\n                        yearMonth: yearMonth.trim(),\n                        calendarId: calendarId.trim(),\n                        appointmentId: appointmentId.trim(),\n                        timezone: timezone.trim(),\n                    },\n                    dataType: 'json', timeout: 10000,\n                }).done(function (response) {\n                    localStorage.setItem(cacheKey, JSON.stringify({ response, expiration: now + expirationTime }));\n                    updateDisabledDates(response);\n                    fetchDataForNextMonth(year, month);\n                }).fail(function (xhr, status) {\n                    if ((status === 'timeout' || status === 'error') && retryCount < maxRetries) {\n                        fetchDisabledDates(year, month, retryCount + 1);\n                    } else {\n                        hideLoader();\n                    }\n                });\n            }\n\n            async function fetchDataForNextMonth(year, month) {\n                let nextYear = month === 12 ? year + 1 : year;\n                let nextMonth = month === 12 ? 1 : month + 1;\n                const cacheKey = `disabledDates_${calendarId}_${appointmentId}_${nextYear}_${nextMonth}_${timezone}`;\n                const now = Date.now();\n\n                if (localStorage.getItem(cacheKey)) {\n                    const cachedData = JSON.parse(localStorage.getItem(cacheKey));\n                    if (cachedData && cachedData.expiration > now) {\n                        return;\n                    }\n                }\n\n                $.ajax({\n                    url: 'https:\/\/migflug.com\/wp-admin\/admin-ajax.php',\n                    method: 'GET',\n                    data: {\n                        action: 'datepicker_fetch_disabled_dates',\n                        yearMonth: nextYear + '-' + (\"0\" + nextMonth).slice(-2),\n                        calendarId: calendarId.trim(),\n                        appointmentId: appointmentId.trim(),\n                        timezone: timezone.trim(),\n                    }, dataType: 'json', timeout: 10000,\n                }).done(function (response) {\n                    localStorage.setItem(cacheKey, JSON.stringify({ response, expiration: now + expirationTime }));\n                }).fail(hideLoader);\n            }\n\n           function updateDisabledDates(response) {\n    if (response && response.success) {\n        disabledDays = response.data.map(item => item.date);\n\n        \/\/ Wait until datepicker is fully initialized (just to be sure)\n        setTimeout(() => {\n            const firstAvailable = disabledDays.sort()[0];\n            if (firstAvailable) {\n                const [year, month, day] = firstAvailable.split('-');\n                const jsDate = new Date(year, month - 1, day);\n                const $dp = $('#datepicker_69d27e35a93c9');\n                $dp.datepicker('setDate', jsDate);\n                $dp.datepicker('refresh');\n            }\n        }, 100); \/\/ wait a tick\n    }\n    hideLoader();\n}\n\n\n            function showAvailableDay() {\n                const now = DateTime.now().setZone(timezone);\n                fetchDisabledDates(now.year, now.month);\n            }\n\n            function hideLoader() {\n                $('.datepicker-loader-overlay, .spinner').remove();\n            }\n\n            function debounce(func, wait) {\n                let timeout;\n                return function (...args) {\n                    clearTimeout(timeout);\n                    timeout = setTimeout(() => func.apply(this, args), wait);\n                };\n            }\n        });\n    <\/script>\n    \n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","editor_notices":[],"footnotes":""},"categories":[1],"tags":[],"class_list":["post-11936","post","type-post","status-publish","format-standard","hentry","category-allgemein"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>FloridaCalTest | MiGFlug<\/title>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"FloridaCalTest | MiGFlug\" \/>\n<meta property=\"og:url\" content=\"https:\/\/migflug.com\/ru\/\u0431\u043b\u043e\u0433\/floridacaltest\/\" \/>\n<meta property=\"og:site_name\" content=\"MiGFlug\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-30T16:52:13+00:00\" \/>\n<meta name=\"author\" content=\"Philipp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c\" \/>\n\t<meta name=\"twitter:data1\" content=\"Philipp\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/migflug.com\\\/blog\\\/floridacaltest\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/migflug.com\\\/blog\\\/floridacaltest\\\/\"},\"author\":{\"name\":\"Philipp\",\"@id\":\"https:\\\/\\\/migflug.com\\\/#\\\/schema\\\/person\\\/d792d41d5885ff460b5f2e6830edc14a\"},\"headline\":\"FloridaCalTest\",\"datePublished\":\"2025-01-30T16:52:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/migflug.com\\\/blog\\\/floridacaltest\\\/\"},\"wordCount\":22,\"publisher\":{\"@id\":\"https:\\\/\\\/migflug.com\\\/#organization\"},\"articleSection\":[\"Allgemein\"],\"inLanguage\":\"ru-RU\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/migflug.com\\\/blog\\\/floridacaltest\\\/\",\"url\":\"https:\\\/\\\/migflug.com\\\/blog\\\/floridacaltest\\\/\",\"name\":\"FloridaCalTest | MiGFlug\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/migflug.com\\\/#website\"},\"datePublished\":\"2025-01-30T16:52:13+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/migflug.com\\\/blog\\\/floridacaltest\\\/#breadcrumb\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/migflug.com\\\/blog\\\/floridacaltest\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/migflug.com\\\/blog\\\/floridacaltest\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\\\/\\\/migflug.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FloridaCalTest\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/migflug.com\\\/#website\",\"url\":\"https:\\\/\\\/migflug.com\\\/\",\"name\":\"MiGFlug\",\"description\":\"Fly a Jet Fighter Yourself\",\"publisher\":{\"@id\":\"https:\\\/\\\/migflug.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/migflug.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ru-RU\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/migflug.com\\\/#organization\",\"name\":\"MiGFlug GmbH\",\"url\":\"https:\\\/\\\/migflug.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\\\/\\\/migflug.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\/\\/migflug.com\\/wp-content\\/uploads\\/2018\\/10\\/logo-migflug-blue.png\",\"contentUrl\":\"https:\\/\\/migflug.com\\/wp-content\\/uploads\\/2018\\/10\\/logo-migflug-blue.png\",\"width\":200,\"height\":100,\"caption\":\"MiGFlug GmbH\"},\"image\":{\"@id\":\"https:\\\/\\\/migflug.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/migflug.com\\\/#\\\/schema\\\/person\\\/d792d41d5885ff460b5f2e6830edc14a\",\"name\":\"Philipp\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9105f75c8ed22d44575c17c20363ced0d6b4abf07f2039c7e0067f7fdff1f65c?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9105f75c8ed22d44575c17c20363ced0d6b4abf07f2039c7e0067f7fdff1f65c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9105f75c8ed22d44575c17c20363ced0d6b4abf07f2039c7e0067f7fdff1f65c?s=96&d=mm&r=g\",\"caption\":\"Philipp\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"FloridaCalTest | MiGFlug","robots":{"index":"noindex","follow":"follow"},"og_locale":"ru_RU","og_type":"article","og_title":"FloridaCalTest | MiGFlug","og_url":"https:\/\/migflug.com\/ru\/\u0431\u043b\u043e\u0433\/floridacaltest\/","og_site_name":"MiGFlug","article_published_time":"2025-01-30T16:52:13+00:00","author":"Philipp","twitter_card":"summary_large_image","twitter_misc":{"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c":"Philipp"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/migflug.com\/blog\/floridacaltest\/#article","isPartOf":{"@id":"https:\/\/migflug.com\/blog\/floridacaltest\/"},"author":{"name":"Philipp","@id":"https:\/\/migflug.com\/#\/schema\/person\/d792d41d5885ff460b5f2e6830edc14a"},"headline":"FloridaCalTest","datePublished":"2025-01-30T16:52:13+00:00","mainEntityOfPage":{"@id":"https:\/\/migflug.com\/blog\/floridacaltest\/"},"wordCount":22,"publisher":{"@id":"https:\/\/migflug.com\/#organization"},"articleSection":["Allgemein"],"inLanguage":"ru-RU"},{"@type":"WebPage","@id":"https:\/\/migflug.com\/blog\/floridacaltest\/","url":"https:\/\/migflug.com\/blog\/floridacaltest\/","name":"FloridaCalTest | MiGFlug","isPartOf":{"@id":"https:\/\/migflug.com\/#website"},"datePublished":"2025-01-30T16:52:13+00:00","breadcrumb":{"@id":"https:\/\/migflug.com\/blog\/floridacaltest\/#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/migflug.com\/blog\/floridacaltest\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/migflug.com\/blog\/floridacaltest\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/migflug.com\/"},{"@type":"ListItem","position":2,"name":"FloridaCalTest"}]},{"@type":"WebSite","@id":"https:\/\/migflug.com\/#website","url":"https:\/\/migflug.com\/","name":"\u041c\u0438\u0413\u0424\u043b\u0443\u0433","description":"\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0438\u0441\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0435\u043c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e","publisher":{"@id":"https:\/\/migflug.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/migflug.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ru-RU"},{"@type":"Organization","@id":"https:\/\/migflug.com\/#organization","name":"MiGFlug GmbH","url":"https:\/\/migflug.com\/","logo":{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/migflug.com\/#\/schema\/logo\/image\/","url":"https:\/\/migflug.com\/wp-content\/uploads\/2018\/10\/logo-migflug-blue.png","contentUrl":"https:\/\/migflug.com\/wp-content\/uploads\/2018\/10\/logo-migflug-blue.png","width":200,"height":100,"caption":"MiGFlug GmbH"},"image":{"@id":"https:\/\/migflug.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/migflug.com\/#\/schema\/person\/d792d41d5885ff460b5f2e6830edc14a","name":"\u0424\u0438\u043b\u0438\u043f\u043f","image":{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/secure.gravatar.com\/avatar\/9105f75c8ed22d44575c17c20363ced0d6b4abf07f2039c7e0067f7fdff1f65c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9105f75c8ed22d44575c17c20363ced0d6b4abf07f2039c7e0067f7fdff1f65c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9105f75c8ed22d44575c17c20363ced0d6b4abf07f2039c7e0067f7fdff1f65c?s=96&d=mm&r=g","caption":"Philipp"}}]}},"_links":{"self":[{"href":"https:\/\/migflug.com\/ru\/wp-json\/wp\/v2\/posts\/11936","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/migflug.com\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/migflug.com\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/migflug.com\/ru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/migflug.com\/ru\/wp-json\/wp\/v2\/comments?post=11936"}],"version-history":[{"count":0,"href":"https:\/\/migflug.com\/ru\/wp-json\/wp\/v2\/posts\/11936\/revisions"}],"wp:attachment":[{"href":"https:\/\/migflug.com\/ru\/wp-json\/wp\/v2\/media?parent=11936"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/migflug.com\/ru\/wp-json\/wp\/v2\/categories?post=11936"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/migflug.com\/ru\/wp-json\/wp\/v2\/tags?post=11936"}],"curies":[{"name":"WP","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}