11-02-2017 05:04 PM
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.
11-06-2017 02:03 AM
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;
11-06-2017 02:03 AM
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;
11-28-2017 04:36 PM
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...
11-30-2017 12:59 AM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.