Wednesday, 22 February 2012

Customizing OBIEE Calendar Display Format in Prompts

Here comes yet another customization on the calendar format m/d/yyyy. Long time back we had discussed on the Date formats that are available for reoprting and how to make changes on them. Customising the default date formats in localedefinition.xml file also reflects the date order display in the calendar prompt format.

                                Existing Calendar display Format

Suppose if the date display order is changed from m/d/yyyy(08/04/2011) to dd/MM/yyyy(04/08/2011) in the localedefinition.xml file, the calender format would still be in the format d/M/yyyy(4/8/2011). In order to change the calendar format to dd/MM/yyyy(04/08/2011) appending '0' for dates & months in unit digit ,make the following changes
  • Locate the file calendar.js in both the application's res container and application server's res container under the directory  < res>\b_mozilla
  • Make a copy of the javascript for backup
  • Edit the calendar.js file and search for the function 'NQCSetDate'
  • Add the following code below the variable declaration 'var ds = g_dDateSep'
         var m=m;
         var d=d;

  • Save the changes and make sure that the updated calendar.js is placed in both the containers
Customized Calendar display format
  • Restart the services for the changes to reflect

No comments:

Post a Comment

Thanks to Comment