I am trying to:
disable the date picker in cred forms a set a mask on it with the right format of te date dd-mm-yyyy
Link to a page where the issue can be seen:
I expected to see:
Instead, I got:
I use the js code on the CRED form:
jQuery(document).ready(function($){
$("input.hasDatepicker").datepicker('disable');
$("input.hasDatepicker").removeAttr('disabled');
$("input.hasDatepicker").removeAttr('readonly');
});
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Jacques,
Thank you for contacting our support forum.
Did the above code work for you ?
If not could you provide me with a link tot he site where I can see the form.
Thanks,
Shane
Hi Shane,
Thanks for the reply. Nice to meet again here.
No the code don't work. The site is in development so you need to login for the form. Ca I make a save reply for the credentials?
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Jacques,
The private fields are enabled 🙂
Thanks,
Shane
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Jacques,
Could you try this solution here.
https://stackoverflow.com/questions/18350923/jquery-enabling-disabling-datepicker
Also could you let me know which form has the issue i.e the name of the form.
Thanks,
Shane
CRED = 'Formulier beoordelingen toevoegen'
hidden link
The solutions on stack overflow doesn't work.
Hi Shane. It's morning over here. Do you have a solution for the 'problem'?
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Jacques,
My shift ended yesterday so im taking another look now.
Thanks,
Shane
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Jacques,
Ok so i've found the solution and its this.
jQuery(document).ready(function(){
jQuery( ".js-wpt-date" ).datepicker( "option", "disabled", true );
});
I've already added it to the site and the datepicker should now be disabled.
Thanks,
Shane
Hi Shane.
I still see the pickers in the form. See the screen print.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Jacques,
Is it that you want to disable the datepickers or remove them from the form.
Thanks,
Shane
Hi Shane,
Both. Disable the datepickers and remove them from the form. I just want al field on the form where I can fill in the date with a mask 'dd-mm-yyyy'. What I see now is that the date pickers is sill active an I can't fill in the date by 'hand'.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Jacques,
I Understand the issue 🙂 it's not that you want the field to be disabled its that you want to enter your dates manually into something like a text field.
To do this just change the field to a single line field in Types.
Please let me know if this helps.
Thanks,
Shane
Hi Shane,
thanks for the tip. I thought of course that option but them I can't calculate with the fields do I. When I want tot see all the CPT after or before a date I can not calculate that I think.