-
AuthorPosts
-
November 9, 2018 at 1:09 pm #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
November 11, 2018 at 8:50 pm #1032321November 14, 2018 at 1:15 pm #1033486okay, thanks victoria,
but is it possible that a calenderbox will be open?
best regards, uweNovember 16, 2018 at 12:09 pm #1034405Hi,
A calendar box will open when you click the date input field. You can also type in the date manually.
Best regards,
IsmaelNovember 21, 2018 at 3:34 pm #1036107thanks ismael,
is it possible that a calender-box will be open?
best regards, uweNovember 22, 2018 at 11:21 am #1036441Hi,
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,
IsmaelNovember 23, 2018 at 9:04 pm #1037124thanks 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, weDecember 3, 2018 at 3:40 am #1040085Hi,
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,
IsmaelDecember 3, 2018 at 12:19 pm #1040238great work! thanks!!!!
December 5, 2018 at 12:27 am #1041021Hi,
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 -
AuthorPosts
- You must be logged in to reply to this topic.