sreevp2020
Programmer
Javascript that was working in Cognos 10 is not working in Cognos 11 for date calender prompt to show dynamic default date.
Any suggestions please
Cognos 10 working javascript
<script language = "javascript">
var formWR = getFormWarpRequest();
var dateTxtPrompt = formWR.txtDateCountStartDatePrompt
var vCurrDate = new Date();
var vFirstDay= new Date(vCurrDate.getFullYear(), vCurrDate.getMonth(),1);
var vStrDay = [vFirstDay.getUTCFullYear(), vFirstDay.getMonth()+1, vFirstDay.getDate()].join("-");
dateTxtPrompt.value = vStrDay;
</script>
Any suggestions please
Cognos 10 working javascript
<script language = "javascript">
var formWR = getFormWarpRequest();
var dateTxtPrompt = formWR.txtDateCountStartDatePrompt
var vCurrDate = new Date();
var vFirstDay= new Date(vCurrDate.getFullYear(), vCurrDate.getMonth(),1);
var vStrDay = [vFirstDay.getUTCFullYear(), vFirstDay.getMonth()+1, vFirstDay.getDate()].join("-");
dateTxtPrompt.value = vStrDay;
</script>