Disable Past dates in Date Picker

Hi,
I want to Hide/Disable Past dates in Date Picker. I would like to show only Future dates in date picker.
I tried the below code. It didnt works and i am using 2018v.
var dateToday = new Date();
$(function() {
$( “#datepicker” ).datepicker({
showButtonPanel: true,
minDate: dateToday
});
});

Press [F12] from your browser, and see whether any Javascript error message displayed. Post the error message here for more discussion.

what i usaullly do is I disable “use datepicker” in firld settings of that field such thats phpmaker will leave it as a normal text field.
Then on startup script i draw the date picker myself after defining all the json i want and passing it to the fucntion they use to draw a date picker.HINT: look at the genenerated add page you should see a line liek below:ew_CreateDateTimePicker(“fleave_applicationadd”, “x_end_date”, { “ignoreReadonly”: true, “useCurrent”: false, “format”: 2, “minDate”: custom_date });NOTE:reolace “fleave_applicationadd” which your real table name and “x_end_date” with your field name also ensure you have the variable custom_date defined somewhere before use.I also found the best way to pass a value from server side to client side so as to use it is through pad_data_rendering by adding a script tag to the header like below// Page Data Rendering event
function Page_DataRendering(&$header) {//detrmine variable in phpcode
$dateToday = ew_CurrentDate();

// Example:
//pass the values into header
$header = "<script> var custom_date = '".$dateToday."'; </script>";

}BUT would also like to know why the above approach did not work coz i once tried approaching it the same and I failed so i resorted to the approach am giving you as i found it even better since i have alot more controll over it

$(function() {
$( “#datepicker” ).datepicker({
showButtonPanel: true,
minDate: dateToday
});
});
--------------------------------the Console reply is the following --------------------------------------
Uncaught TypeError: $(…).datepicker is not a function

at HTMLDocument. (v_bt_formationadd.php:287)

at j (jquery-3.2.1.min.js:2)

at k (jquery-3.2.1.min.js:2)
(what went wrong)

Since you use jquery-3.2.1.min.js, are you using an older version?