I need to add a JavaScript code to my custom module, to modify the property in a date popup calendar and make it dynamic.
According to the documentation of the date popup calendar, the syntax for modifying the MaxDate is:
$( ".selector" ).datepicker({
maxDate: "+1m"
});
I have to write "+1m" dynamically because it may be "+2m", "+3m", etc, it is variable.
How can I write a JavaScript code in my custom module and effect the popup calendar? I am wondering if I use script tag and put the JavaScript code inside it. In case, how can I do it by js?