Skip Navigation

[Fermé] Set minDate as today for custom date field

This support ticket is created Il y a 7 années et 7 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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

Supporter timezone: Asia/Kolkata (GMT+05:30)

Marqué : 

This topic contains 3 réponses, has 2 voix.

Last updated by Minesh Il y a 7 années et 7 mois.

Assisted by: Minesh.

Auteur
Publications
#432230

I am trying to: Set MinDate of the calendar date picker on the filters to that of today.

I visited this URL:
Here's the page in question which has the view with the filters: hidden link

I expected to see:
Everything works as expected. I only want that users should not be able to select past date in the two datepickers (start date and end date)

p.s.: I already looked at: https://toolset.com/forums/topic/disable-types-date-picker-past-dates/ but can't seem to make it work. The code mentioned over here simply triggers that calendar with past dates disabled. (i.e. the calendar is already open).

Kindly help.

#432466

Minesh
Supporter

Languages: Anglais (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

There are multiple ways but could you please try following code and try to add it to your view's filter section's JS box:

jQuery(document).ready(function($) {
  $('#date').datepicker({ minDate: 0 });
});

If you cant able to make it.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#432960

Dear Minesh,

This code isn't working. Neither is:
jQuery(document).ready(function($) {
$(".js-wpv-frontend-datepicker").datepicker({ minDate: 0 });
});

Based on the start-date and end-date of the field, can you please let me know what suitable selectors I need to have: hidden link

#432996

Minesh
Supporter

Languages: Anglais (English )

Timezone: Asia/Kolkata (GMT+05:30)

Is it possible for you to share temporary access details that will help me to debug further and hopefully I will fix your issue:

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

Le sujet ‘[Fermé] Set minDate as today for custom date field’ est fermé à de nouvelles réponses.