Tagged: 

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #607942

    Hi,

    I’m using the default Enfold contact form to book a restaurant table and for this I need to disable the Sunday and Monday. I found other threads mentioning looking at line 366 of file /enfold/framework/php/class-form-generator.php but the line mentioned is not the same as the code I see on line 366.

    Any help on this would be much appreciated.

    Regards,
    Daniel

    #608919

    Hey strila!

    We are working on your ticket please wait while we update the results here soon.

    This can be done using CSS and you can remove background gold it is just for visual clue

    .ui-datepicker-calendar .ui-datepicker-week-end+.ui-datepicker-week-end a.ui-state-default, .ui-datepicker-calendar tr > td:first-child a.ui-state-default  {
        background-color: gold;
        pointer-events: none;
    }

    Best regards,
    Vinay

    • This reply was modified 8 years, 8 months ago by Vinay.
    #609444

    Thanks Vinnie! It works :)

    Can you briefly explain the css parts for me or perhaps a link to more info? Can I do the same with dates in the past?

    Thanks again, Daniel

    #609497

    I also find that pointer-events: none; isn’t working on mobile (iOS).

    #609511

    Hey!

    not sure which kind of css explanation you want, but Google gives you good css tutorials: http://www.w3schools.com/css/

    Can you provide us a precise link with the elements in question please? we need to be able to inspect them.

    Try to add an !important:

    .ui-datepicker-calendar .ui-datepicker-week-end+.ui-datepicker-week-end a.ui-state-default, .ui-datepicker-calendar tr > td:first-child a.ui-state-default  {
        background-color: gold;
        pointer-events: none !important;
    }
    

    and clear browser cache afterwards. Check on another mobile device as well.

    Best regards,
    Andy

    #609569

    Hi Andy,

    I know some CSS, thanks :) When I ask a question I often think: could I have done this myself? I’m not sure in this case.

    Check link in private section. !important was already added. Checked on iOS Safari + Chrome, normal and incognito mode, several devices used. The color works, the pointer-events don’t. From what I read here the pointer-events property isn’t very compatible with non-SVG content.

    #609600

    Hi!

    Please go to enfold/framework/php/class-form-generator.php file and find following line

                echo 'jQuery(document).ready(function(){ jQuery(".avia_datepicker").datepicker({

    and add following right below it

    beforeShowDay: function(date) {
            var day = date.getDay();
            return [(day != 1 && day != 0)];
        },

    Cheers!
    Yigit

    #609606

    Hi Yigit,

    awesome, thanks! Can I use this file in my child-theme? Copying the framework/php/class-form-generator.php structure doesn’t seem to work.

    #609618

    Hey!

    Please copy unmodified file and paste it inside enfold-child folder and edit the line i mentioned above and find following line at the top

    <?php  if (  ! defined( 'AVIA_FW' ) ) exit( 'No direct script access allowed' );

    and change it to

    <?php 

    then add following code to Functions.php file of your child theme

    require( 'class-form-generator.php' );

    Regards,
    Yigit

    #609627

    Yep, this works. Thanks so much! :)

    I changed it to require( 'framework/php/class-form-generator.php' ); so I can keep the original structure and keep ways organised.

    • This reply was modified 8 years, 8 months ago by Daniel.
    #609637

    Hey!

    Great!

    You are welcome, glad we could help!
    Let us know if you have any other questions or issues :)

    Regards,
    Yigit

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Datepicker's configuration of the contact form’ is closed to new replies.