COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: mlodugu1 on 03 Apr 2021 02:09:13 PM

Title: Javascript for setting default dates in date prompts
Post by: mlodugu1 on 03 Apr 2021 02:09:13 PM
Hi Friends,

I need to dynamically set default values for two date prompts: 'dateFrom' and 'dateTo' (UI: Editbox & Calendar type: Gregorian).
In the first prompt I need to set the default value to 1st day of the current year while I have to set the default value of the second prompt to current date.

Please help me with javascript code for the above requirement. Another thing is I want the default values to appear in the format: yy-mon-dd (month should be like Jan, Feb, Mar.....) if possible.