hello All,
I need to create Date Prompt in report page(not in Prompt Page ),
I use script below to set date default value,but need to input value when delete Date Prompt Default Selections.
how to use script to set the default value in report page.
thanks.
<script>
function subtractDay ()
{
var dtToday = new Date();
var dtYesterday = new Date( dtToday - 86400000 ); // 86400000 = 24 hours * 60 (minutes per hour) * 60 (seconds per minute) * 1000 (milliseconds per second)
var strYesterday = [dtYesterday.getUTCFullYear(), dtYesterday.getMonth()+1, dtYesterday.getDate()].join("-");
return strYesterday;
}
pickerControlPDate.setValue( subtractDay() );
</script>
please update DatePrompt Miscellaneous property to PDate.
I need to create Date Prompt in report page(not in Prompt Page ),
I use script below to set date default value,but need to input value when delete Date Prompt Default Selections.
how to use script to set the default value in report page.
thanks.
<script>
function subtractDay ()
{
var dtToday = new Date();
var dtYesterday = new Date( dtToday - 86400000 ); // 86400000 = 24 hours * 60 (minutes per hour) * 60 (seconds per minute) * 1000 (milliseconds per second)
var strYesterday = [dtYesterday.getUTCFullYear(), dtYesterday.getMonth()+1, dtYesterday.getDate()].join("-");
return strYesterday;
}
pickerControlPDate.setValue( subtractDay() );
</script>
please update DatePrompt Miscellaneous property to PDate.