Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1031639

    How can I add a date selection to a contact form? it should become a hotel side, with choice arrival or departure day,

    thanks for help, uwe

    #1032321

    Hey uernst,

    Image 2018-11-11 at 20.50.19.png

    You can add the date picker element to the form.

    Best regards,
    Victoria

    #1033486

    okay, thanks victoria,
    but is it possible that a calenderbox will be open?
    best regards, uwe

    #1034405

    Hi,

    A calendar box will open when you click the date input field. You can also type in the date manually.

    Best regards,
    Ismael

    #1036107

    thanks ismael,
    is it possible that a calender-box will be open?
    best regards, uwe

    #1036441

    Hi,

    What do you mean by “calendar box” exactly? Have you tried adding the date picker element? Again, a calendar box should open when you click on it.

    Best regards,
    Ismael

    #1037124

    thanks ismael,
    i use the datepicker element in the contact form; but a calender box do not open: (i check safari and chrome)…
    thank you for help!
    best regards, we

    #1040085

    Hi,

    Thanks for the update.

    The script is being executed before jQuery loads, which is why it’s not working. I’ve added this code in the functions.php file to fix the issue temporarily

    function ava_load_jquery_dep_script() {
        wp_enqueue_script( 'avia-datepicker-dummy',  get_template_directory_uri() . '/js/test.js', array('jquery'), '1.0' );
    
        wp_add_inline_script( 'avia-datepicker-dummy', 'jQuery(document).ready(function(){ jQuery(".avia_datepicker").datepicker({
            beforeShow: function(input, inst) {
               jQuery("#ui-datepicker-div").addClass(this.id);
               inst.dpDiv.addClass("avia-datepicker-div");
           },
            showButtonPanel: true,
            closeText: AviaDatepickerTranslation.closeText,
            currentText: AviaDatepickerTranslation.currentText,
            nextText: AviaDatepickerTranslation.nextText,
            prevText: AviaDatepickerTranslation.prevText,
            monthNames: AviaDatepickerTranslation.monthNames,
            monthNamesShort: AviaDatepickerTranslation.monthNamesShort,
            dayName: AviaDatepickerTranslation.dayNames,
            dayNamesShort: AviaDatepickerTranslation.dayNamesShort,
            dayNamesMin: AviaDatepickerTranslation.dayNamesMin,
            dayNames: AviaDatepickerTranslation.dayNames,
            dateFormat: AviaDatepickerTranslation.dateFormat,
            firstDay: AviaDatepickerTranslation.firstDay,
            isRTL: AviaDatepickerTranslation.isRTL,
            changeMonth: true,
            changeYear: true,
            yearRange: "c-80:c+10"
        }); });' );
     }
    add_action( 'wp_enqueue_scripts', 'ava_load_jquery_dep_script', 10 );
    

    Best regards,
    Ismael

    #1040238

    great work! thanks!!!!

    #1041021

    Hi,

    Glad we could help!

    Please take a moment to review our theme and show your support https://themeforest.net/downloads
    Don’t forget to bookmark Enfold Documentation for future reference.

    Thank you for using Enfold :)

    Best regards,
    Basilis

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