{"id":39,"date":"2026-12-03T04:13:31","date_gmt":"2026-12-03T04:13:31","guid":{"rendered":"https:\/\/3.106.54.253\/?page_id=39"},"modified":"2026-12-03T04:35:02","modified_gmt":"2026-12-03T04:35:02","slug":"flight-finder","status":"publish","type":"page","link":"https:\/\/travel.cosmeticchoice.com\/?page_id=39","title":{"rendered":"Flight Finder"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Whether you&#8217;re considering cosmetic procedures, dental treatments, hair restoration, wellness services or other elective treatments overseas, we help you discover destinations and access useful information to plan your journey. Explore travel options, compare flights and accommodation, discover local experiences and learn what to consider when researching international healthcare providers. Our goal is to make it easier to plan the travel aspects of your experience while helping you make informed decisions about your healthcare journey \u2014 from initial research and preparation to travelling and planning for aftercare.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Your journey starts with informed choices. Explore destinations, discover travel options and plan your next step.<\/strong><\/p>\n\n\n\n<div id=\"cc-flight-explorer\">\n  <style>\n    #cc-flight-explorer {\n      font-family: Arial, sans-serif;\n      max-width: 1100px;\n      margin: 0 auto;\n      color: #263445;\n    }\n\n    #cc-flight-explorer .cc-form {\n      display: grid;\n      grid-template-columns: repeat(2, 1fr);\n      gap: 16px;\n      padding: 22px;\n      background: #f7f9fc;\n      border: 1px solid #e1e7ef;\n      border-radius: 12px;\n    }\n\n    #cc-flight-explorer label {\n      display: block;\n      font-size: 13px;\n      font-weight: 600;\n      margin-bottom: 7px;\n    }\n\n    #cc-flight-explorer input,\n    #cc-flight-explorer select {\n      width: 100%;\n      min-width: 0;\n      height: 46px;\n      padding: 0 12px;\n      border: 1px solid #cbd5e1;\n      border-radius: 7px;\n      background: white;\n      font-size: 15px;\n      box-sizing: border-box;\n    }\n\n    #cc-flight-explorer button {\n      cursor: pointer;\n      border: 0;\n      border-radius: 7px;\n      background: #EDB17E;\n      color: #263445;\n      font-size: 15px;\n      font-weight: 700;\n      padding: 0 22px;\n      height: 46px;\n    }\n\n    #cc-flight-explorer button:hover {\n      opacity: .88;\n    }\n\n    #cc-flight-explorer .cc-location {\n      position: relative;\n    }\n\n    #cc-flight-explorer .cc-suggestions {\n      display: none;\n      position: absolute;\n      top: 74px;\n      left: 0;\n      right: 0;\n      z-index: 9999;\n      background: white;\n      border: 1px solid #ddd;\n      border-radius: 7px;\n      box-shadow: 0 5px 15px #0002;\n      max-height: 240px;\n      overflow-y: auto;\n    }\n\n    #cc-flight-explorer .cc-suggestions button {\n      display: block;\n      width: 100%;\n      height: auto;\n      text-align: left;\n      padding: 12px;\n      border-radius: 0;\n      background: white;\n      color: #263445;\n      border-bottom: 1px solid #eee;\n      font-weight: normal;\n    }\n\n    #cc-flight-explorer .cc-suggestions button:hover {\n      background: #f1f5f9;\n    }\n\n    #cc-flight-explorer .cc-actions {\n      grid-column: 1 \/ -1;\n      display: flex;\n      justify-content: flex-end;\n    }\n\n    #cc-flight-explorer .cc-actions button {\n      min-width: 180px;\n    }\n\n    #cc-flight-explorer .cc-map {\n      margin-top: 24px;\n      width: 100%;\n      min-height: 500px;\n      overflow: hidden;\n    }\n\n    @media(max-width: 650px) {\n      #cc-flight-explorer .cc-form {\n        grid-template-columns: 1fr;\n      }\n\n      #cc-flight-explorer .cc-actions {\n        grid-column: 1;\n      }\n\n      #cc-flight-explorer .cc-actions button {\n        width: 100%;\n      }\n\n      #cc-flight-explorer .cc-map {\n        min-height: 400px;\n      }\n    }\n  <\/style>\n\n\n  <p>Choose your departure city, travel dates and currency.<\/p>\n\n  <div class=\"cc-form\">\n\n    <div class=\"cc-location\">\n      <label for=\"cc-origin\">From Location<\/label>\n      <input id=\"cc-origin\" type=\"text\" value=\"Melbourne (MEL)\" autocomplete=\"off\" placeholder=\"Search city or airport\">\n      <div id=\"cc-suggestions\" class=\"cc-suggestions\"><\/div>\n    <\/div>\n\n    <div>\n      <label for=\"cc-currency\">Currency<\/label>\n      <select id=\"cc-currency\">\n        <option value=\"aud\" selected=\"\">AUD \u2013 Australian Dollar<\/option>\n        <option value=\"usd\">USD \u2013 US Dollar<\/option>\n        <option value=\"eur\">EUR \u2013 Euro<\/option>\n        <option value=\"gbp\">GBP \u2013 British Pound<\/option>\n        <option value=\"inr\">INR \u2013 Indian Rupee<\/option>\n      <\/select>\n    <\/div>\n\n    <div>\n      <label for=\"cc-departure\">Departure Date<\/label>\n      <input id=\"cc-departure\" type=\"date\" required=\"\">\n    <\/div>\n\n    <div>\n      <label for=\"cc-return\">Return Date<\/label>\n      <input id=\"cc-return\" type=\"date\" required=\"\">\n    <\/div>\n\n    <div class=\"cc-actions\">\n      <button type=\"button\" id=\"cc-update\">\n        Update Map\n      <\/button>\n    <\/div>\n\n  <\/div>\n\n  <div id=\"cc-status\" aria-live=\"polite\" style=\"margin-top:12px;font-size:13px;color:#64748b\">\n    Showing flight prices from Melbourne in AUD.\n  <\/div>\n\n  <div id=\"cc-map\" class=\"cc-map\"><\/div>\n<\/div>\n\n<script>\n(function () {\n  const root = document.getElementById('cc-flight-explorer');\n\n  if (!root || root.dataset.initialized) return;\n  root.dataset.initialized = 'true';\n\n  const originInput = root.querySelector('#cc-origin');\n  const currencyInput = root.querySelector('#cc-currency');\n  const departureInput = root.querySelector('#cc-departure');\n  const returnInput = root.querySelector('#cc-return');\n  const suggestions = root.querySelector('#cc-suggestions');\n  const mapContainer = root.querySelector('#cc-map');\n  const status = root.querySelector('#cc-status');\n  const updateButton = root.querySelector('#cc-update');\n\n  let selected = {\n    code: 'MEL',\n    lat: -37.8136,\n    lng: 144.9631,\n    name: 'Melbourne'\n  };\n\n  let searchTimer;\n\n  \/\/ Use local calendar dates to avoid UTC date shifts.\n  function localDate(date) {\n    const year = date.getFullYear();\n    const month = String(date.getMonth() + 1).padStart(2, '0');\n    const day = String(date.getDate()).padStart(2, '0');\n\n    return `${year}-${month}-${day}`;\n  }\n\n  const today = new Date();\n  const tomorrow = new Date(today);\n  tomorrow.setDate(today.getDate() + 1);\n\n  const nextWeek = new Date(today);\n  nextWeek.setDate(today.getDate() + 7);\n\n  departureInput.min = localDate(today);\n  departureInput.value = localDate(tomorrow);\n\n  returnInput.min = departureInput.value;\n  returnInput.value = localDate(nextWeek);\n\n  \/\/ Update minimum return date when departure changes.\n  departureInput.addEventListener('change', function () {\n    returnInput.min = departureInput.value;\n\n    if (returnInput.value < departureInput.value) {\n      returnInput.value = departureInput.value;\n    }\n  });\n\n  \/\/ Location autocomplete.\n  originInput.addEventListener('input', function () {\n    clearTimeout(searchTimer);\n\n    const term = originInput.value.trim();\n\n    if (term.length < 2) {\n      suggestions.style.display = 'none';\n      return;\n    }\n\n    searchTimer = setTimeout(async function () {\n      try {\n        const url = new URL(\n          'https:\/\/autocomplete.travelpayouts.com\/places2'\n        );\n\n        url.searchParams.set('term', term);\n        url.searchParams.set('locale', 'en');\n        url.searchParams.append('types[]', 'city');\n        url.searchParams.append('types[]', 'airport');\n\n        const response = await fetch(url);\n\n        if (!response.ok) {\n          throw new Error('Autocomplete unavailable');\n        }\n\n        const places = await response.json();\n\n        suggestions.replaceChildren();\n\n        places.slice(0, 10).forEach(function (place) {\n          const button = document.createElement('button');\n          const code = place.code;\n          const name = place.name;\n\n          button.textContent =\n            name + ' (' + code + ') \u2013 ' +\n            (place.country_name || '');\n\n          button.type = 'button';\n\n          button.addEventListener('click', function () {\n            selected = {\n              code: code,\n              lat: place.coordinates.lat,\n              lng: place.coordinates.lon,\n              name: name\n            };\n\n            originInput.value = name + ' (' + code + ')';\n            suggestions.style.display = 'none';\n          });\n\n          suggestions.appendChild(button);\n        });\n\n        suggestions.style.display =\n          places.length ? 'block' : 'none';\n\n      } catch (error) {\n        suggestions.style.display = 'none';\n\n        status.textContent =\n          'Could not load location suggestions. Please try again.';\n      }\n    }, 300);\n  });\n\n  document.addEventListener('click', function (event) {\n    if (!root.contains(event.target)) {\n      suggestions.style.display = 'none';\n    }\n  });\n\n  \/\/ Refresh Prices on Map.\n  function updateMap() {\n\n    const departure = departureInput.value;\n    const returnDate = returnInput.value;\n\n    if (!departure || !returnDate) {\n      status.textContent = 'Please select both travel dates.';\n      return;\n    }\n\n    if (returnDate < departure) {\n      status.textContent =\n        'Return date cannot be earlier than departure date.';\n      return;\n    }\n\n    const currency = currencyInput.value;\n\n    const params = new URLSearchParams({\n      currency: currency,\n      trs: '610670',\n      shmarker: '815991',\n      lat: String(selected.lat),\n      lng: String(selected.lng),\n      powered_by: 'true',\n      search_host: 'www.aviasales.com\/search',\n      locale: 'en',\n      origin: selected.code,\n      value_min: '0',\n      value_max: '1000000',\n      round_trip: 'true',\n      only_direct: 'false',\n      radius: '1',\n      draggable: 'true',\n      disable_zoom: 'false',\n      show_logo: 'false',\n      scrollwheel: 'false',\n      primary: '#EDB17E',\n      secondary: '#3FABDB',\n      light: '#ffffff',\n      width: '1500',\n      height: '500',\n      zoom: '2',\n      promo_id: '4054',\n      campaign_id: '100'\n    });\n\n    mapContainer.replaceChildren();\n\n    const script = document.createElement('script');\n\n    script.async = true;\n    script.charset = 'utf-8';\n    script.src =\n      'https:\/\/tpwdg.com\/content?' + params.toString();\n\n    mapContainer.appendChild(script);\n\n    status.textContent =\n      'Map refreshed. Origin: ' + selected.name +\n      ' (' + selected.code + '). Currency: ' +\n      currency.toUpperCase() +\n      '. Selected dates: ' + departure +\n      ' to ' + returnDate +\n      '. Note: dates are displayed selections and do not filter map prices.';\n  }\n\n  updateButton.addEventListener('click', updateMap);\n\n  \/\/ Initial map.\n  updateMap();\n\n})();\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Whether you&#8217;re considering cosmetic procedures, dental treatments, hair restoration, wellness services or other elective treatments overseas, we help you discover destinations and access useful information to plan your journey. Explore travel options, compare flights and accommodation, discover local experiences and learn what to consider when researching international healthcare providers. Our goal is to make it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-39","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/travel.cosmeticchoice.com\/index.php?rest_route=\/wp\/v2\/pages\/39","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/travel.cosmeticchoice.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/travel.cosmeticchoice.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/travel.cosmeticchoice.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/travel.cosmeticchoice.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=39"}],"version-history":[{"count":6,"href":"https:\/\/travel.cosmeticchoice.com\/index.php?rest_route=\/wp\/v2\/pages\/39\/revisions"}],"predecessor-version":[{"id":47,"href":"https:\/\/travel.cosmeticchoice.com\/index.php?rest_route=\/wp\/v2\/pages\/39\/revisions\/47"}],"wp:attachment":[{"href":"https:\/\/travel.cosmeticchoice.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}