pcmelby
asked on
Use cfselect to jump to a month in cfcalendar? (Coldfusion Flash form)
I am currently using a datefield for date selection in a Coldfusion Flash Form. The problem is occasionally we need to select a date several months or even years in the future. Right now we have to scroll through the calendar until we get to the right month and then select the date. I may have to do away with the datefield altogether and replace it with either a text field or dropdowns for month, day, and year. Before I abandon the datefield, however, I was wondering if there's a way of using a dropdown that lets them easily jump ahead to another month/year?
ASKER
I do mean datefield, not cfcalendar. The text field next to the calendar isn't editable, though. You can't type in it, it just displays the selected date from the calendar.
I'll check these out and see if I can get it working right. Thanks!
I'll check these out and see if I can get it working right. Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>> text field or dropdowns
Are you talking about a cfcalendar? Because a datefield already is a textbox (with a calendar popup on the side). If do mean a datefield, you can change the displayed month with action script
<cfformitem type="script">
function changeCalendarMonth(calMon
// datefield month is 0 based, so deducting 1 to get the correct month
myDateField.displayedMonth
myDateField.displayedYear = calYear;
}
</cfformitem>
Or the selected date with the undocumented DateFormatter
<cfformitem type="script">
function changeCalendarDate(dateStr
var d:Date = mx.formatters.DateFormatte
myDateField.selectedDate = d;
}
</cfformitem>
I haven't tried it, but those may work with calendar objects too.