src/web/js/mgtSearchEmailMsgs.js
/**
 * This method checks if the given 2 times are valid (thus the start date is not after the end date.
 * 
 * @param htmlFrom The HTML object to get the start-date.
 * @param htmlTo   The HTML object to get the end-date.
 * @param sText    The text to display if the start date is greater.
 * 
 * @return true if the dates are OK. Otherwise false.
 */
This method checks if the given 2 times are valid (thus the start date is not after the end date.

@param htmlFrom The HTML object to get the start-date.
@param htmlTo   The HTML object to get the end-date.
@param sText    The text to display if the start date is greater.

@return true if the dates are OK. Otherwise false.
This method checks if the given 2 times are valid ( thus the start date is not after the end date . @param htmlFrom The HTML object to get the start - date . @param htmlTo The HTML object to get the end - date . @param sText The text to display if the start date is greater . @return true if the dates are OK . Otherwise false .
function checkDates(htmlFrom, htmlTo, sText)
{
	var bReturn = true;
	var sFromTime = htmlFrom.getValue();
	var sToTime = htmlTo.getValue();
	if (sFromTime != "" && sToTime != "")
	{
		var dFromTime = new Date();
	 	var dToTime = new Date();
		dFromTime.setUTCFullYear(parseInt(sFromTime.substring(0, 4), 10));
		dFromTime.setUTCMonth(parseInt(sFromTime.substring(5, 7), 10) - 1);
		dFromTime.setUTCDate(parseInt(sFromTime.substring(8, 10), 10));
		dFromTime.setUTCHours(parseInt(sFromTime.substring(11, 13), 10));
		dFromTime.setUTCMinutes(parseInt(sFromTime.substring(14, 16), 10));
		dFromTime.setUTCSeconds(parseInt(sFromTime.substring(17, 19), 10));
		dToTime.setUTCFullYear(parseInt(sToTime.substring(0, 4), 10));
		dToTime.setUTCMonth(parseInt(sToTime.substring(5, 7), 10) - 1);
		dToTime.setUTCDate(parseInt(sToTime.substring(8, 10), 10));
		dToTime.setUTCHours(parseInt(sToTime.substring(11, 13), 10));
		dToTime.setUTCMinutes(parseInt(sToTime.substring(14, 16), 10));
		dToTime.setUTCSeconds(parseInt(sToTime.substring(17, 19), 10));
		if (dFromTime > dToTime)
		{
			application.showError(sText, "Cordys Error", htmlFrom);
			WebForm.setValidStyleClass(htmlFrom, false);
			htmlFrom.focus();
			bReturn = false;
		}
	}
	return bReturn;
}
function checkDates ( htmlFrom , htmlTo , sText ) { var bReturn = true ; var sFromTime = htmlFrom . getValue ( ) ; var sToTime = htmlTo . getValue ( ) ; if ( sFromTime != "" && sToTime != "" ) { var dFromTime = new Date ( ) ; var dToTime = new Date ( ) ; dFromTime . setUTCFullYear ( parseInt ( sFromTime . substring ( 0 , 4 ) , 10 ) ) ; dFromTime . setUTCMonth ( parseInt ( sFromTime . substring ( 5 , 7 ) , 10 ) - 1 ) ; dFromTime . setUTCDate ( parseInt ( sFromTime . substring ( 8 , 10 ) , 10 ) ) ; dFromTime . setUTCHours ( parseInt ( sFromTime . substring ( 11 , 13 ) , 10 ) ) ; dFromTime . setUTCMinutes ( parseInt ( sFromTime . substring ( 14 , 16 ) , 10 ) ) ; dFromTime . setUTCSeconds ( parseInt ( sFromTime . substring ( 17 , 19 ) , 10 ) ) ; dToTime . setUTCFullYear ( parseInt ( sToTime . substring ( 0 , 4 ) , 10 ) ) ; dToTime . setUTCMonth ( parseInt ( sToTime . substring ( 5 , 7 ) , 10 ) - 1 ) ; dToTime . setUTCDate ( parseInt ( sToTime . substring ( 8 , 10 ) , 10 ) ) ; dToTime . setUTCHours ( parseInt ( sToTime . substring ( 11 , 13 ) , 10 ) ) ; dToTime . setUTCMinutes ( parseInt ( sToTime . substring ( 14 , 16 ) , 10 ) ) ; dToTime . setUTCSeconds ( parseInt ( sToTime . substring ( 17 , 19 ) , 10 ) ) ; if ( dFromTime > dToTime ) { application . showError ( sText , "Cordys Error" , htmlFrom ) ; WebForm . setValidStyleClass ( htmlFrom , false ) ; htmlFrom . focus ( ) ; bReturn = false ; } } return bReturn ; }
This method checks if the given 2 times are valid (thus the start date is not after the end date.
This method checks if the given 2 times are valid ( thus the start date is not after the end date .