OBIEE IS BETWEEN Date Validation for dashboard prompt

Normally when we are working with Calendar date with Between operator we are not seeing any alert message if the user enters the inappropriate dates.
For this we need to some workaround to alert the user for proper dates to input.
To validate date for correct format I have already posted in this blog:http://shivabizint.wordpress.com/2009/04/13/date-validation-for-dash-board-prompt-calendar-control/
Now to alert the user if he is entering inconsistent dates for Between operator we need to add simple code in globalfilterprompt.js.you need to alter this file in two locations
1.\OracleBI\web\app\res\b_mozilla\prompts
2.\OracleBI\oc4j_bi\j2ee\home\applications\analytics\analytics\res\b_mozilla\prompts

Steps to do:
Step1: As usual take a backup of your globalfilterprompt.js otherwise you will loss the actual behavior of the prompt if you not done properly.
Step2: Open Globalfilterprompt.js and search for the if (sNewOp == “between”) loop.
And add the following code in this loop after values declaration.
Code snippet:
if(sVal2 < sVal)
{
alert(“Value-2 should be greater than Value-1″);
}
Step3: Now your if (sNewOp == “between”) should be like this
if (sNewOp == “between”)
{
var sVal = tValues[0];
var sVal2 = tValues[1];
// var bVal = (sVal && (sVal != ksDropDownAllChoices) && (sVal != ksEditBoxAllChoices));
// var bVal = (sVal2 && (sVal2 != ksDropDownAllChoices) && (sVal2 != ksEditBoxAllChoices));
if (sVal == ksDropDownAllChoices || sVal == ksEditBoxAllChoices || sVal == ksDropDownNone)
sVal = “”;
if (sVal2 == ksDropDownAllChoices || sVal2 == ksEditBoxAllChoices || sVal2 == ksDropDownNone)
sVal2 = “”;
//Shiva code for BETWEEN Operator//
if(sVal2 < sVal)
{
alert(“Value-2 should be greater than Value-1″);
}
//Shiva code for BETWEEN Operator//
if (!(sVal && sVal2))
{
if (!sVal && sVal2)
tF.sOp = “lessOrEqual”;
else if (sVal && !sVal2)
tF.sOp = “greaterOrEqual”;
else
tF.sOp = “prompted”;
}
}
Step4: Now restart Oracle BI Java Host and Oracle BI Presentation server and also OC4J for better results (I am always doing this).
Now check the Date with between parameter to alert user:
datebetween12