Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (53 sloc) 2.31 KB
<cfcomponent output="false">
<cffunction name="init">
<cfset this.version = "1.0.2">
<cfreturn this>
<cffunction name="$dateOrTimeSelect" returntype="string" access="public" output="false">
<cfargument name="objectName" type="any" required="true">
<cfargument name="property" type="string" required="true">
<cfargument name="$functionName" type="string" required="true">
<cfargument name="include" type="string" default="date">
var loc = {}; = $tagName(arguments.objectName,;
arguments.$id = $tagId(arguments.objectName,;
// TODO: need to make this a list of date/time ids and then do once
loc.js = addJS(arguments.$id,arguments.include);
loc.value = $formValue(argumentCollection=arguments);
loc.returnValue = "";
loc.returnValue = Evaluate('textField(argumentCollection=arguments)');
<cfreturn loc.returnValue>
<cffunction name="addJS" returntype="Any" access="public" output="false" hint="" mixin="controller">
<cfargument name="id" type="any" required="true">
<cfargument name="include" type="any" hint="will decide what js to include date, time, or both" required="true">
<!--- TODO: css and js files in a better location locally --->
<cfsavecontent variable="headJS">
<script type="text/javascript" src="/plugins/dateFriendly/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/plugins/dateFriendly/js/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="/plugins/dateFriendly/js/timepicker.js"></script>
<!--- TODO: extract only the specific css needed --->
<link type="text/css" href="" rel="stylesheet" />
<link type="text/css" href="" rel="stylesheet" />
<!--- if date/time --->
<script type="text/javascript">
$(function() {
duration: '',
showTime: true,
constrainInput: false,
stepMinutes: 1,
stepHours: 1,
altTimeField: '',
time24h: false
<cfhtmlhead text="#headJS#" />