COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: inu on 04 Jun 2017 01:32:21 AM

Title: Javascript codes for setting default date in date prompt not working fine.
Post by: inu on 04 Jun 2017 01:32:21 AM
Hi Team,

I picked javascript code from IBM developerswork which has been validated using IBM Cognos BI 10.2. see the link below
https://www.ibm.com/developerworks/library/ba-pp-reporting-scripting_techniques-page634/

When i right click on page and run that, js works fine and gets set default date, but when i run with html , it doesnot work at all and current date dispplays.

Please suggest, what steps should i take to accomplish the task.



Regards,
Inam
Title: Re: Javascript codes for setting default date in date prompt not working fine.
Post by: inu on 06 Aug 2017 12:41:36 AM
Quote from: inu on 04 Jun 2017 01:32:21 AM
Hi Team,

I picked javascript code from IBM developerswork which has been validated using IBM Cognos BI 10.2. see the link below
https://www.ibm.com/developerworks/library/ba-pp-reporting-scripting_techniques-page634/

When i right click on page and run that, js works fine and gets set default date, but when i run with html , it doesnot work at all and current date dispplays.

Please suggest, what steps should i take to accomplish the task.



Regards,
Inam
Quote from: inu on 04 Jun 2017 01:32:21 AM
can you please guys help me out, where i am missing in code.
i kept below js code after date prompt and put the name of it defaultDate.
PFA


I will really appreciate your response.



Title: Re: Javascript codes for setting default date in date prompt not working fine.
Post by: Blue on 24 Aug 2017 08:19:34 PM
Inam,
please provide more information if you really want help from this form.  What version of Cognos Analytics are you working in? Are you using this JS script via a Custom Control and in Full Interactive Mode? Etc.
Blue