Skip to main content
Participant
August 7, 2009
Question

CFCalendar will not display in IE8 nor Firefox

  • August 7, 2009
  • 1 reply
  • 1763 views

I've recently installed and configured Apache 2.2 along with ColdFusion 8.  I'm trying to use the CFCALENDAR tag but it will not display in IE8 nor Firefox.  Has anyone had this problem?  I've tried using the following code from Adobe but it will not display.  Any help would be greatly appreciated.

<!--- Set initial selected and blocked-out dates.--->
<cfparam name="Form.startdate" default="#dateformat(now()-5, 'mm/dd/yyyy')#">
<cfparam name="Form.enddate" default="#dateformat(now()-1, 'mm/dd/yyyy')#">
<cfparam name="Form.selectdate" default="#dateformat(now(), 'mm/dd/yyyy')#">
<!--- If the form has been submitted, display the selected date. --->
<cfif isDefined("Form.submitit")>
   <cfoutput><b>You selected #Form.selectedDate#</b><br><br></cfoutput>
</cfif>
<b>Please select a date on the calendar and click Save.</b><br>
<br>
<cfform name="form1" format="Flash" skin="haloBlue" width="375" height="350" >
   <cfcalendar name="selectedDate"
      selectedDate="#Form.selectdate#"
      startRange="#Form.startdate#"
      endRange="#Form.enddate#"
      mask="mmm dd, yyyy"
      dayNames="SU,MO,TU,WE,TH,FR,SA"
      monthNames="JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC"
      style="rollOverColor:##FF0000"
      width="200" height="150" >
   <cfinput type="dateField" name="startdate" label="Block out starts"
      width="100" value="#Form.startdate#">
   <cfinput type="dateField" name="enddate" label="Block out ends" width="100"
      value="#Form.enddate#">
   <cfinput type="dateField" name="selectdate" label="Initial date" width="100"
      value="#Form.selectdate#" >
   <cfinput type="Submit" name="submitit" value="Save" width="100">
</cfform>

This topic has been closed for replies.

1 reply

BKBK
Community Expert
Community Expert
August 11, 2009

<!--- Set initial selected and blocked-out dates.--->
<cfset yearNow = year(now())>
<cfset monthNow = month(now())>
<cfset today = day(now())>

<!---
I assume you intend the differences -5 and -1 to apply to the year.
If they're in months or days then you should use the dateAdd function instead.
--->
<cfparam name="Form.startdate" default="#createdate(yearNow-5,monthNow,today)#">
<cfparam name="Form.enddate" default="#createdate(yearNow-1,monthNow,today)#">
<cfparam name="Form.selectdate" default="#createdate(yearNow,monthNow,today)#">

<!--- If the form has been submitted, display the selected date. --->
<cfif isDefined("Form.submitit")>
   <cfoutput><b>You selected #Form.selectedDate#</b><br><br></cfoutput>
</cfif>
<b>Please select a date on the calendar and click Save.</b><br>
<br>
<cfform name="form1" format="Flash" skin="haloBlue" width="375" height="350" >
   <cfcalendar name="selectedDate"
      selectedDate="#Form.selectdate#"
      startRange="#Form.startdate#"
      endRange="#Form.enddate#"
      mask="mmm dd, yyyy"
      dayNames="SU,MO,TU,WE,TH,FR,SA"
      monthNames="JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC"
      style="rollOverColor:##FF0000"
      width="200" height="150" >
   <cfinput type="dateField" name="startdate" label="Block out starts"
      width="100" value="#Form.startdate#">
   <cfinput type="dateField" name="enddate" label="Block out ends" width="100"
      value="#Form.enddate#">
   <cfinput type="dateField" name="selectdate" label="Initial date" width="100"
      value="#Form.selectdate#" >
   <cfinput type="Submit" name="submitit" value="Save" width="100">
</cfform>