Skip Navigation

[Resolved] disable date picker

This support ticket is created 7 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 41 replies, has 2 voices.

Last updated by Shane 7 years, 2 months ago.

Assisted by: Shane.

Author
Posts
#567662

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:

#567664

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');
});

#567719

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

#567723

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?

#567725

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jacques,

The private fields are enabled 🙂

Thanks,
Shane

#567735

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

#567739

CRED = 'Formulier beoordelingen toevoegen'

hidden link

The solutions on stack overflow doesn't work.

#567866

Hi Shane. It's morning over here. Do you have a solution for the 'problem'?

#567983

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

#567985

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

#568123
Schermafdruk 2017-09-09 00.04.45.png

Hi Shane.

I still see the pickers in the form. See the screen print.

#568781

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

#568803

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'.

#568846

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

#568909

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.