• Resolved wichtc91

    (@wichtc91)


    Dear Developpers,

    Many thanks for your great plugin (at least the Free version), it’s been very useful so far.
    I was wondering if there is a way to restrict the Datepicker field type to only activate specific days of the week as well as specific months in a year? In my case, I’d clients to only be able to select amongst Tuesdays from May to December (on my page, the field is called “Début de l’abonnement”).


    Many thanks for your support and best regards,

    Corentin Wicht

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Dina S.

    (@themehighsupport)

    Hi,

    Unfortunately, there is no option available in our plugin to achieve this requirement.

    Thank you!

    Thread Starter wichtc91

    (@wichtc91)

    Thanks for your reply.
    What about using some jQuery lines of code in the page where I placed the Datepicker widget?
    Here is the actual code I retrieved from my web browser:

    <input type="text" autocomplete="off" id="debutabo215" name="debutabo" value="" data-year-range="-100:+10" class="thwepof-input-field thwepof-date-picker validate-required hasDatepicker" data-readonly="no">

    Would you be able to provide me with a code block (my knowlegde is a bit limited…) ?

    I have come up with something like this but don’t know where to place it and how to link it with your Datepicker widget?

    function EnableTuesday(date) {
    
       var day = date.getDay();
       if (day == 2) {
          return [true] ; 
       } 
       else {  
           return [false] ;
       }
    }
    
    jQuery(document).ready(function(){
    
       jQuery('.datepicker').datepicker({                   
           beforeShowDay: DisableTuesday
    
       }); 
    });


    Thanks,
    C.

    • This reply was modified 12 months ago by wichtc91.
    Dina S.

    (@themehighsupport)

    Hi,

    Your requirement needs to be checked in detail. Can you please raise a ticket through our website? We hope our technical team will be able to help you.

    Thank you!

    Dina S.

    (@themehighsupport)

    We believe our technical team has adequately addressed your question.

    We are going to mark this thread as resolved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Restrict datepicker field range’ is closed to new replies.