{"id":5133,"date":"2024-05-09T20:06:27","date_gmt":"2024-05-09T20:06:27","guid":{"rendered":"https:\/\/africanbikers.ape-marketing.net\/?page_id=5133"},"modified":"2024-10-18T14:55:23","modified_gmt":"2024-10-18T14:55:23","slug":"booking-confirmation","status":"publish","type":"page","link":"https:\/\/africanbikers.com\/en\/buchungsbestaetigung\/","title":{"rendered":"Booking confirmation"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"5133\" class=\"elementor elementor-5133\" data-elementor-post-type=\"page\">\n\t\t\t\t<div data-particle_enable=\"false\" data-particle-mobile-disabled=\"false\" class=\"elementor-element elementor-element-6796cf1 e-flex e-con-boxed e-con e-parent\" data-id=\"6796cf1\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-f902d29 elementor-widget elementor-widget-shortcode\" data-id=\"f902d29\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">No Traveller Information!!<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-06a71c7 elementor-widget elementor-widget-html\" data-id=\"06a71c7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<script src=\"https:\/\/cdn.jsdelivr.net\/npm\/parsleyjs\"><\/script>\r\n\r\n<script>\r\n    \r\n    document.addEventListener('DOMContentLoaded', function () {\r\n  const birthdayInput = document.getElementById('birthday-1');\r\n  \r\n  birthdayInput.addEventListener('input', function () {\r\n    const value = birthdayInput.value.trim();\r\n    const datePattern = \/^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$\/;\r\n\r\n    \/\/ Check if the date matches the pattern YYYY-MM-DD\r\n    if (!datePattern.test(value)) {\r\n      birthdayInput.setCustomValidity('Please enter a valid date in the format YYYY-MM-DD');\r\n    } else {\r\n      const [year, month, day] = value.split('-').map(Number);\r\n      const date = new Date(year, month - 1, day);\r\n\r\n      \/\/ Check if the date object corresponds to the input values (to handle cases like Feb 30)\r\n      if (\r\n        date.getFullYear() !== year ||\r\n        date.getMonth() + 1 !== month ||\r\n        date.getDate() !== day\r\n      ) {\r\n        birthdayInput.setCustomValidity('The entered date is not valid.');\r\n      } else {\r\n        birthdayInput.setCustomValidity(''); \/\/ Valid input, so clear the error message\r\n      }\r\n    }\r\n\r\n    birthdayInput.reportValidity(); \/\/ Show validation messages\r\n  });\r\n\r\n  \/\/ Optional: Prevent form submission if the input is invalid\r\n  const form = birthdayInput.closest('form');\r\n  if (form) {\r\n    form.addEventListener('submit', function (e) {\r\n      if (!birthdayInput.checkValidity()) {\r\n        e.preventDefault(); \/\/ Prevent form submission if the date is invalid\r\n        birthdayInput.reportValidity(); \/\/ Show the error message\r\n      }\r\n    });\r\n  }\r\n});\r\n\r\n\r\n<\/script>\r\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5133","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/africanbikers.com\/en\/wp-json\/wp\/v2\/pages\/5133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/africanbikers.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/africanbikers.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/africanbikers.com\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/africanbikers.com\/en\/wp-json\/wp\/v2\/comments?post=5133"}],"version-history":[{"count":0,"href":"https:\/\/africanbikers.com\/en\/wp-json\/wp\/v2\/pages\/5133\/revisions"}],"wp:attachment":[{"href":"https:\/\/africanbikers.com\/en\/wp-json\/wp\/v2\/media?parent=5133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}