Hi,
I am using APS 1.6.4, In the Form fields when I use a Date field- there is a Min and Max Value available in the Advanced tab of the Date field in the Form editor.
How can I restrict selection to be future dates? Does the above fields help me in this regard?
Any suggestions would be appreciated... Thank you...
Regards.
Solved! Go to Solution.
Using javaScript you can do.
Create two date field then in javascript write
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();
var todaysdate=dd+"-"+mm+"-"+yyyy;
form.fields[0].fields[1][0].maxValue=todaysdate;
form.fields[0].fields[2][0].minValue=todaysdate;
Using javaScript you can do.
Create two date field then in javascript write
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();
var todaysdate=dd+"-"+mm+"-"+yyyy;
form.fields[0].fields[1][0].maxValue=todaysdate;
form.fields[0].fields[2][0].minValue=todaysdate;
Hi- I need to get the date field from the form object- In the example given by you we assume that the first field in the form is the date field- I was checking the api's but could not find anything useful-
For e.g.: if the form field id was "golivedate"- how would I get it from the form object? could you guide me? Thanks in advance...
you can changes this according to your requirement like
form.fields[0].fields[1][0].maxValue=todaysdate; to form.fields[0].fields[2][1].maxValue=todaysdate;
It is just an example.
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.