-
<cfcomponent name="Ajax_Calendar_Functions" extends="ajax">
-
<cfsetting showdebugoutput="false">
-
-
<cffunction name="getEvents" output="false" returntype="string" access="public"
-
hint="returns a list of events for a selected date">
-
<cfargument name="eventDate" type="date" required="true" />
-
-
<cfscript>
-
var returnResult = '';
-
var qryResult = '';
-
-
//gset the event gateway
-
variables.gatewayEvents = createObject("component","eventsGateway").init(application.dsn);
-
-
//return a query of events
-
qryResult = variables.gatewayEvents.getEventsByDate(dateFormat(arguments.eventDate,"mm-dd-yyyy"));
-
</cfscript>
-
-
<cfsavecontent variable="returnResult">
-
<cfoutput>
-
<h3>#dateFormat(arguments.eventDate,'mmm d, yyyy')#</h3>
-
<p>
-
<cfloop query="qryResult">
-
#event_Name# -
-
#timeFormat(start_date, 'short')#
-
<br />
-
</cfloop>
-
</p>
-
</cfoutput>
-
</cfsavecontent>
-
-
<cfscript>
-
return returnResult;
-
</cfscript>
-
</cffunction>
-
</cfcomponent>