I'm glad it worked. I double checked the video myself because I thought I missed something when I first tried. I thought I'd give it a shot and it worked.
Original Message:
Sent: 05-06-2026 16:31
From: Kurt Marshman
Subject: DatePicker - force to show no past dates
Andrew,
I had not but just did and it works...so thank you for the response.
Did I miss that in the video?
Thanks,
Kurt
------------------------------
Kurt Marshman
Old World Industries, LLC
Original Message:
Sent: 05-06-2026 15:56
From: Andrew Landry
Subject: DatePicker - force to show no past dates
Hi Kurt,
Did you enable the rule to run on form load? That's what I had to do to get this to work.
------------------------------
Andrew Landry
Leprino Foods Company
CO
Original Message:
Sent: 05-06-2026 11:06
From: Kurt Marshman
Subject: DatePicker - force to show no past dates
Hammad,
I ran into a couple issues:
When I place your suggested code in the date field the past dates are not greyed out when the calendar pops up. However, when I select a past date in the calendar the date returned to the field is the current date. I found that to be "acceptable".
What I didn't realize until testing it is the date that was "selected" was the date maintained in a hidden input value in the html. Example - I selected 5/1/2026 and the date field shows 5/5/2026 (which was current date). The html for the inputs value=2026-05-01
Code Used:
jQuery(function ($) {
const $el = $("#dp_frm_component_input1_2945");
if ($el.hasClass("hasDatepicker")) {
$el.datepicker("option", {
minDate: 0,
showOn: "focus"
});
}
});
Thoughts on a fix?
Thanks,
Kurt
Using Version 24
------------------------------
Kurt Marshman
Old World Industries, LLC
Original Message:
Sent: 05-04-2026 12:53
From: Hammad Naeem
Subject: DatePicker - force to show no past dates
Hi Kurt.
This is what i love about Javascript capabilities with Automate Evolve. You can surely achieve this, please refer below attached video for steps.
NOTE: below video contains both scenarios where you want to disable dates on a single datepicker(0mins to 2:26) or all datepickers (2:26 to 3:24).
-----------------
Code used:
jQuery(function ($) {
const $el = $("#Date-picker-id");
if ($el.hasClass("hasDatepicker")) {
$el.datepicker("option", {
minDate: 0,
showOn: "focus" // removes the button, only opens on click/focus
});
}
});
-------------------------
for all datepickers:
jQuery(function ($) {
$(".form-datepicker.hasDatepicker").each(function () {
$(this).datepicker("option", {
minDate: 0,
showOn: "focus"
});
});
});
------------------
Hope this helps.
------------------------------
Hammad Naeem
*Precisely Software Inc.
Original Message:
Sent: 04-30-2026 11:34
From: Kurt Marshman
Subject: DatePicker - force to show no past dates
Is there a method to force individual patepickers to show no past dates to be selected?
The following will default any past selected date to current the current date, but I would prefer if they don't even show.
As a field rule as a custom:
$j(function () {$j("#dp_frm_component_input1_2945").datepicker("option", "minDate", 0);});
Thanks,
Kurt
------------------------------
Kurt Marshman
Old World Industries, LLC
------------------------------