• Hi there, I notice the other thread is closed now – but we were also hoping to know if there has been any possibility of an update on this. We want to restrict specific days so people do not choose them.

    If there is a Pro version, we would be happy to pay for that version, but there doesn’t appear to be.

    Also noting that WP is warning now that this plug-in hasn’t been tested with the latest 3 versions. I have noticed some odd behaviour now with the Calendar day and time selection. All of a sudden since the latest WP updates, in the Calendar Dropdown, if the user moves the scroll button, it doesn’t scroll forward/backward in chronological order, it jumps everywhere. Suddenly may be in March 2025 and if you touch the scroll wheel a little, it might jump to February 2023, and then August 2024, and then goes a bit random.

    Hoping you’ve had an opportunity to look at some of these. Many thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Awais

    (@awais300)

    @dan1980 Thank you for reaching out! I appreciate your patience and interest in the plugin.

    There isn’t a Pro version available, but I’m continuously working on improvements whenever time allows, based on user feedback.

    I have addressed the issues you mentioned and added two new filters that allow you to restrict specific dates and weekdays. Please check the latest update and use the following example to adjust the settings according to your needs:

    Restrict specific dates:

    // This filter prevents users from selecting certain dates in the date-time picker.  
    add_filter( 'gf_awp_calendar_restricted_dates', function( $restricted_dates, $form ) {
    // Add your restricted dates here. Dates should be provided in the format DD.MM.YYYY
    return array( '05.03.2025', '12.03.2025' );
    }, 10, 2 );

    Restrict specific weekdays (e.g., weekends) for each month:

    // This filter disables all selected weekdays (e.g., Saturdays and Sundays) in the date-time picker.  
    add_filter( 'gf_awp_calendar_restricted_weekdays', function( $restricted_weekdays, $form ) {
    // 0 = Sunday, 6 = Saturday, disables all weekends of each month
    return array( 0, 6 );

    // Complete list:
    // 0 = Sunday
    // 1 = Monday
    // 2 = Tuesday
    // 3 = Wednesday
    // 4 = Thursday
    // 5 = Friday
    // 6 = Saturday

    }, 10, 2 );

    Code goes in function.php file of the active child theme (or active theme).

    Thread Starter Dan

    (@dan1980)

    That’s amazing, thank you so much. I’ll test that out and let you know how it goes!

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