// the fields current value currentValue = attributes.currentValues[fqFieldName]; // the param structure which will hold all of the fields from the props dialog xparams = parameters[fieldQuery.inputID]; // Pass new date URL variable through to the Calendar Picker if ( StructKeyExists(request.params,"newSelectedTime") ) currentValue = request.params.newSelectedTime; // Validate if the property field has been defined if ( NOT StructKeyExists(xparams, "fldID") OR LEN(xparams.fldID) LTE 0 ) xparams.fldID = TRIM(fqFieldName); else xparams.fldID = TRIM(xparams.fldID); if ( NOT StructKeyExists(xparams, "uiTheme") OR LEN(xparams.uiTheme) LTE 0 ) xparams.uiTheme = "redmond"; if ( NOT StructKeyExists(xparams, "displayType") OR LEN(xparams.displayType) LTE 0 ) xparams.displayType = "UItimepickerAddon"; if ( NOT StructKeyExists(xparams, "fldIcon") OR LEN(xparams.fldIcon) LTE 0 ) xparams.fldIcon = "none"; if ( NOT StructKeyExists(xparams, "fldIconImg") OR LEN(xparams.fldIconImg) LTE 0 ) xparams.fldIconImg = "/ADF/extensions/customfields/time_picker/clock.png"; if ( NOT StructKeyExists(xparams, "standardizedDateStr") OR LEN(xparams.standardizedDateStr) LTE 0 ) xparams.standardizedDateStr = "1900-01-01"; if ( NOT StructKeyExists(xparams, "cfTimeMask") OR LEN(xparams.cfTimeMask) LTE 0 ) xparams.cfTimeMask = "h:mm tt"; if ( NOT StructKeyExists(xparams, "jsTimeMask") OR LEN(xparams.jsTimeMask) LTE 0 ) xparams.jsTimeMask = ""; //-- App Override Variables --// if ( NOT StructKeyExists(xparams, "appBeanName") OR LEN(xparams.appBeanName) LTE 0 ) xparams.appBeanName = ""; if ( NOT StructKeyExists(xparams, "appPropsVarName") OR LEN(xparams.appPropsVarName) LTE 0 ) xparams.appPropsVarName = ""; // XPARAMS fields that cannot be overridden by the App xparamsExceptionsList = "fldID,appBeanName,appPropsVarName"; // Optional ADF App Override for the Custom Field Type XPARAMS If ( LEN(TRIM(xparams.appBeanName)) AND LEN(TRIM(xparams.appPropsVarName)) ) { xparams = application.ADF.utils.appOverrideCSParams( csParams=xparams, appName=xparams.appBeanName, appParamsVarName=xparams.appPropsVarName, paramsExceptionList=xparamsExceptionsList ); } displayValue = ""; if ( LEN(TRIM(currentValue)) ) { // Fix bad or incorrect date/time entries stored currentValue = application.ADF.date.csDateFormat(currentValue,currentValue); // Strip the standardizedDateStr from the currentValue and do a TimeFormat for Display displayValue = TimeFormat(TRIM(REPLACE(currentValue,xparams.standardizedDateStr,"","all")),xparams.cfTimeMask); } // Set Default Icon Options useClockIcon = false; if ( xparams.fldIcon EQ "clock") useClockIcon = true; // jQuery Headers application.ADF.scripts.loadJQuery(); application.ADF.scripts.loadJQueryUI(themeName=xparams.uiTheme); // Load the DateJS Plugin Headers application.ADF.scripts.loadDateJS(); // Load the DateFormat Plugin Headers application.ADF.scripts.loadDateFormat(); if ( xparams.displayType IS "UItimepickerAddon" ) { application.ADF.scripts.loadJQueryUITimepickerAddon(); if ( LEN(TRIM(xparams.jsTimeMask)) EQ 0 ) xparams.jsTimeMask = "h:mm TT"; } else if ( xparams.displayType IS "UItimepickerFG" ) { application.ADF.scripts.loadJQueryUITimepickerFG(); } // Set defaults for the label and description includeLabel = true; includeDescription = true; //-- Update for CS 6.x / backwards compatible for CS 5.x -- // If it does not exist set the Field Permission variable to a default value if ( NOT StructKeyExists(variables,"fieldPermission") ) variables.fieldPermission = ""; //-- Read Only Check w/ cs6 fieldPermission parameter -- readOnly = application.ADF.forms.isFieldReadOnly(xparams,variables.fieldPermission);
disabled="disabled"> time picker
#application.ADF.forms.wrapFieldHTML(inputHTML,fieldQuery,attributes,variables.fieldPermission,includeLabel,includeDescription)#