Facing issue in Datetime activity.
I want to allow the user to select date rance only the previous month and current month date. But I am unable to do it.
FYI if today is 17 march 2020 so user would be able to select date between 1st Feb 2020 to 31 March 2020
-
Hi Rakesh
As far as I know it is only possible trough Javascript. AgilePoint is using JQuery datepiker. Therfore you can use the attributes 'minDate' and 'maxDate'. Here is a simple example of it:eFormEvents.onFormLoadComplete = function ()
{
var currentDate = new Date();
var firstDay = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1);
var lastDay = new Date(currentDate.getFullYear(), currentDate.getMonth()+1, 0);$('#internalFieldName').datepicker('option', 'minDate', firstDay);
$('#internalFieldName').datepicker('option', 'maxDate', lastDay);
}
Hope it helps!
Regards,
Tobias
サインインしてコメントを残してください。
コメント
2件のコメント