• Resolved drtransfers

    (@drtransfers)


    Hi, we need the search datepicker +2, them with more than 48 hours, meaning to block the first two days so clients can’t book.

    Where can we insert this code.
    $( “#datepicker” ).datepicker({
    minDate: 2 // Esto establece el mínimo a 48 horas (2 días) desde la fecha actual
    });
    ———————————————————————————————

    On frontend .php
    $current_time = current_time(‘timestamp’); // Obtiene la fecha y hora actual
    $selected_time = strtotime($selected_date); // Convierte la fecha seleccionada a timestamp

    // Verifica que la fecha seleccionada sea al menos 48 horas en el futuro
    if (($selected_time – $current_time) < 48 * 3600) {
    wc_add_notice( __(‘Las reservas deben realizarse con al menos 48 horas de antelación.’, ‘bus-booking-manager’), ‘error’ );
    return;
    }

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • kayes87

    (@kayes87)

    Hello drtransfers,
    Thank you for your message.
    We offer a buffer time feature for bus bookings in the global settings, which should help you set the minimum booking time to 48 hours. Please check this setting to see if it meets your requirements.
    If it doesn’t work as expected, please create a support ticket, and our team will assist you promptly in resolving the issue.
    Best regards,

    Kayes

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.