Hello. I'm trying to perform a verification for my calendar field but my javascript code don't work. I want my field to display an error message when the user put a date greater than today's one.
jQuery.fn.form.settings.rules.verifdatecreation = function(value, param) { var currentDate = new Date().setHours(0,0,0,0); var selectedDate = new Date(value); if (selectedDate > currentDate) { return false; }else{ return true; } };
Hi tchaabid,
You do not need to validate this, open the calendar advanced settings and set the "End date" to:
Best regards
You do not need to validate this, open the calendar advanced settings and set the "End date" to:
{date:Y-m-d}This will restrict the date selection to end on the same day.
Best regards
This topic is locked and no more replies can be posted.