Hello,
I am trying to prevent the virtual keyboard from popping up on mobile devices when using the datepicker field in gravity forms.
Tried a couple of Jquery suggestions I found on the internet, but they didn't work.
Please assist...
Hello,
I am trying to prevent the virtual keyboard from popping up on mobile devices when using the datepicker field in gravity forms.
Tried a couple of Jquery suggestions I found on the internet, but they didn't work.
Please assist...
Hello, I had this same problem a couple months ago. My solution was to use JS to make the datepicker 'Read Only'. You can see an example on my page here: https://hookahi.com/guides/hucks-charters/ . This means that users must select the date on the calendar popup only, and the keyboard won't on mobile devices because the user can't input text.
Here is the code:
<script type="text/javascript">
jQuery(function() {
jQuery( ".datepicker" ).datepicker({ }).attr('readonly','readonly');
});
</script>
Hope this helps :) let me know if you have any questions
Thanks for the reply!
I managed to get it to work using a hidden html field with the datepicker attached to it and copying the entered value to a field with the readonly property to show the date on screen, but your solution is much more efficient.
I will try it and let you know, thanks again.
No problem, keep me posted!