Categories
Boat Rental
Yacht Rental
Catamaran rental
Sailboat Rental
Boat Rental Without License
RIB Rental
Jet Ski Rental
Gulet rental
Excursions
Cities
Ibiza
San Antonio
Formentera
Santa Eulalia
San Miguel
Blog
Contact
English
Español
(
Spanish
)
Login
Login
Need an account? Register here!
Forgot Password?
Login with Facebook
Login with Google
Register
I only want to book
I want to rent my property
I agree with
terms & conditions
Register
Back to Login
Login with Facebook
Login with Google
Reset Password
Reset Password
Return to Login
0
Login
Sign Up
Submit Property
Total:
0
€
View Cart
Checkout
Categories
Boat Rental
Yacht Rental
Catamaran rental
Sailboat Rental
Boat Rental Without License
RIB Rental
Jet Ski Rental
Gulet rental
Excursions
Cities
Ibiza
San Antonio
Formentera
Santa Eulalia
San Miguel
Blog
Contact
English
Español
(
Spanish
)
Ciudad
All Cities
Formentera (2)
Ibiza (99)
San Antonio (22)
Santa Eulalia (7)
Tipo de barco
Tipo de barco
Boat (53)
Catamaran (9)
Jet Ski (4)
RIB (2)
Sailboat (3)
Unlicensed (6)
Yacht (50)
Nº Personas
Adults
Ages 13 or above
0
Children
Ages 2 to 12
0
Infants
Under 2 years
0
Close
Price range:
0 EUR to 20,000 EUR
Home
Blog List
Your search results
Blog List
×
Log in to your account
Login
Don't have an account?
|
Forgot Password
Login with Facebook
Login with Google
Create an account
I only want to book
I want to rent my property
I agree with
terms & conditions
Create an account
Login with Facebook
Login with Google
Already a member? Sign in!
Login with Facebook
Login with Google
Forgot Password
Reset Password
Return to Login
" const endIndex = word.indexOf(string) + string.length; const htmlText = word.substring(endIndex); document.querySelectorAll('.show_cost_form').forEach((element) => element.remove()) document.querySelectorAll('.cost_row_instant ').forEach((element) => element.remove()) document.querySelector('.full_form').insertAdjacentHTML('beforebegin', htmlText); }) .catch(error => { console.error(error); }) } let dateActiveCount = 0; const enterDateToInput = (date) => { const start_date = document.querySelector('#start_date') const end_date = document.querySelector('#end_date') const activeDates = document.querySelectorAll('.activeTD') let dates = [] activeDates.forEach((element) => { const monthTitle = element.parentElement.parentElement.parentElement.parentElement.querySelector(".month-title"); const title = monthTitle.textContent.split(" "); const day = element.childNodes[0].nodeValue; const year = title[2]; const month = title[1]; const lang = document.querySelector(".wpml-ls-native").getAttribute("lang"); const monthNumber = getMonthNumber(month, lang) const formattedDate = `${day}-${monthNumber}-${year}`; dates.push(formattedDate) }) if(!dates) return if (dates.length === 1){ start_date.value = dates[0] end_date.value = dates[0] appendChildHtml(); return } // Convert dates into Date objects const dateObjects = dates.map((date) => { const parts = date.split('-'); return new Date(parts[2], parts[1] - 1, parts[0]); }); // Sort the dates from smallest to largest dateObjects.sort((a, b) => a - b); // Convert the sorted dates back to the dd-mm-yyyy format const sortedDates = dateObjects.map((date) => { const day = date.getDate(); const month = date.getMonth() + 1; let year = date.getFullYear(); return ('0' + day).slice(-2) + '-' + ('0' + month).slice(-2) + '-' + year; }); start_date.value = sortedDates[0] end_date.value = sortedDates[1] appendChildHtml(); } //JOSE modificacion de la funcion para coger el precio correcto en el calendario. const changePriceForBookingToday = () => { let currentPrice = document.querySelector('.listing_main_image_price'); let todayPrice = document.querySelector('.calendar-today .wprentals_front_calendar_price'); if (currentPrice && todayPrice) { currentPrice = currentPrice.firstChild; currentPrice.textContent = todayPrice.textContent; } } const eventToCalender = () => { const calenders = document.querySelectorAll(".booking-calendar-wrapper"); if (calenders){ calenders.forEach((element) => { const calender = element.querySelector(".wp-calendar"); const calenderDays = calender.querySelectorAll("tbody tr td"); calenderDays.forEach((td) => { td.addEventListener("click", (e) => { console.log('click') if (e.target.classList.contains("pad") || e.target.classList.contains("has_past")) { return; // Si el elemento tiene la clase "pad", no realizar ninguna acción } if (e.target.classList.contains("activeTD")) { e.target.classList.remove("activeTD"); e.target.style.background = "#EDF6F6"; e.target.style.color = "#333"; e.target.childNodes[1].style.color = "#333333" dateActiveCount--; return; } if (dateActiveCount === 2) return; const monthTitle = e.target.parentElement.parentElement.parentElement.parentElement.querySelector(".month-title"); const title = monthTitle.textContent.split(" "); const day = e.target.childNodes[0].nodeValue; if(isNaN(day)) return dateActiveCount++; const year = title[2]; const month = title[1]; const lang = document.querySelector(".wpml-ls-native").getAttribute("lang"); // format date 12-12-2020 const monthNumber = getMonthNumber(month, lang) const formattedDate = ('0' + day).slice(-2) + '-' + ('0' + month).slice(-2) + '-' + year; e.target.classList.add("activeTD"); e.target.style.background = "#030847" e.target.style.color = "#ffffff" e.target.childNodes[1].style.color = "#ffffff" enterDateToInput(formattedDate) }); }); }) } } const checkPageLoaded = () => { if (document.readyState === "interactive") { clearInterval(interval); changePriceForBookingToday(); clearNumberCity(); eventToCalender(); checkInputPatron(); checkDefaultInstanBooking(); if(document.querySelector(".advanced_search_submit_button ")){ document.querySelector(".advanced_search_submit_button ").style.display = "block" } } } let interval = setInterval(checkPageLoaded, 400);