Mitsubishi Outlander
Receive a 20% discount on your rental when you book for 3 or more days in the month of July. The discount will be applied automatically.
* Vehicle image and color is for illustration purpose only
jQuery(function($) {
$(document).ready(function() {
$('.wcpa-fp-day').click(function() {
// Remove 'selected' class from all spans
$('.wcpa-fp-day').removeClass('selected');
// Add 'selected' class to the clicked span
$(this).addClass('selected');
// Check if the clicked span has the class 'wcpa-fp-day_6'
if ($(this).hasClass('wcpa-fp-day_6')) {
// Hide the last 4 li elements
$('.wcpa-fp-time-selector li:gt(-5)').hide();
} else {
// Show all li elements
$('.wcpa-fp-time-selector li').show();
}
});
});
});
jQuery(function($) {
$("#datetime-local-5f58656a66e63").focusout(function() {
$('#datetime-local-5f58656a66e7f').val('');
});
$("#datetime-local-5f58656a66e7f").focusout(function() {
var please = $('#wcpa-paragraph-5f58656a66e97 p').html();
//1720447128108 is original
$('#number-1720447128108').val(please);
$('#number-1720449695497').val(please);
$('#number-1720450269042').val(please);
$('#number-1728440706372').val(please);
});
var logic = function( currentDateTime ){
// 'this' is jquery object datetimepicker
if( currentDateTime.getDay()==6 ){
this.setOptions({
maxTime:'15:30 PM'
});
}else
this.setOptions({
maxTime:'17:30 PM'
});
};
if( $('body.single-product').length ){
jQuery('#datetime-local-5f58656a66e63,#datetime-local-5f58656a66e7f').datetimepicker({
validateOnBlur: false,
onChangeDateTime:logic,
onShow:logic
});
}
function addWorkDays(startDate, days) {
if(isNaN(days)) {
console.log("Value provided for \"days\" was not a number");
return
}
if(!(startDate instanceof Date)) {
console.log("Value provided for \"startDate\" was not a Date object");
return
}
// Get the day of the week as a number (0 = Sunday, 1 = Monday, .... 6 = Saturday)
var dow = startDate.getDay();
var daysToAdd = parseInt(days);
// If the current day is Sunday add one day
if (dow == 0)
daysToAdd++;
// If the start date plus the additional days falls on or after the closest Saturday calculate weekends
if (dow + daysToAdd >= 6) {
//Subtract days in current working week from work days
var remainingWorkDays = daysToAdd - (5 - dow);
//Add current working week's weekend
daysToAdd += 2;
if (remainingWorkDays > 5) {
//Add two days for each working week by calculating how many weeks are included
daysToAdd += 2 * Math.floor(remainingWorkDays / 5);
//Exclude final weekend if remainingWorkDays resolves to an exact number of weeks
if (remainingWorkDays % 5 == 0)
daysToAdd -= 2;
}
}
startDate.setDate(startDate.getDate() + daysToAdd);
return startDate;
}
var today = new Date();
today = addWorkDays(today, 1);
$( "#datetime-local-5f58656a66e63").datetimepicker({defaultDate:today});
});
jQuery(function($) {
function toggleButton() {
var datetime1 = $('#datetime-local-5f58656a66e63').val();
var datetime2 = $('#datetime-local-5f58656a66e7f').val();
var button = $('button[name="add-to-cart"]');
if (datetime1 && datetime2) {
button.prop('disabled', false);
} else {
button.prop('disabled', true);
}
}
// Call the function initially
toggleButton();
// Add event listeners to datetime fields
$('#datetime-local-5f58656a66e63, #datetime-local-5f58656a66e7f').change(function() {
toggleButton();
});
});
jQuery(function($) {
// Function to reset dropdowns
function resetDropdowns() {
$('#wcpa-select-5f585bdb57e8f select, #wcpa-select-5f585bdb57eab select, #wcpa-select-5f585b9fa67fc select, #wcpa-select-5f585b9fa6817 select, #wcpa-select-1599011414008 select, #wcpa-select-1599625955941 select').val('').trigger('change');
}
// Function to handle datetime field change
function handleDatetimeChange() {
resetDropdowns();
}
// Add event listeners to datetime fields
$('#datetime-local-5f58656a66e63, #datetime-local-5f58656a66e7f').change(function() {
handleDatetimeChange();
});
});
jQuery(function($) {
// Event handler for Drop-up Date & Time plus one day on selected Pick-up Date & Time
$('#datetime-local-5f58656a66e63').on('change', function() {
var pickupDate = $(this).datetimepicker('getValue');
if (pickupDate) {
var dropoffDate = new Date(pickupDate);
dropoffDate.setDate(dropoffDate.getDate() + 1); // Add 1 day
$('#datetime-local-5f58656a66e7f').datetimepicker('setOptions', {
minDate: dropoffDate
}); }
});
});