Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Hi
i used this codes
var fieldD1 = FormUtil.getField("dateStart");
var fieldD2 = FormUtil.getField("dateEnd");
var fieldD3 = FormUtil.getField("test");
$(fieldD3).val(fieldD1);
The results = Object object
How to solve ya??? thanksss
Instead of using fieldD1 which is the actual field, you can try using fieldD1.val() to obtain the value.
Hi, instead of using input[name=field] perhaps you can try using the Javascript API#getField(fieldId)
dear experts,
I have 2 form, A and B.
Form B contain the list of dates (7 dates) and the calculation executed here
Form B also act as subform in form A
below is the codes to calculate the difference between dates,
It works perfectly when in preview mode. but the scipt would not work when i place form B as subform
<script type="text/javascript">
$(function(){
$('input[name="dateStart"], input[name="dateEnd"]').change( function(){
d1 = $('input[name="dateStart"]').datepicker('getDate');
d2 = $('input[name="dateEnd"]').datepicker('getDate');
diff = 0;
diff = Math.floor((d2.getTime() - d1.getTime()) / 86400000); // ms per day
diffy = Math.floor((d2.getTime() - d1.getTime()) / 86400000); // ms per day
$('input[name=days1]').val(diff);
$('input[name=datediff1]').val(diffy);
});
});