Thanks. I believe we have some flexibility in the user interface, so we may push for something like that.
- Brendan -----Original Message----- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 02, 2005 4:06 PM To: MyFaces Discussion Subject: Re: Changing the inputCalendar's date using onclick event Perhaps another approach is acceptable? Add a check box that comes up checked by default with "use 12/31/9999". If they uncheck the box and pick their own date, it gets the date from the Calendar component instead. And the calendar can be set to today's date or whatever. Then in your back bean, if check_box = checked, then date = 12/31/99. Else get date from Calendar. Or are you required to do this exactly as you've posted? Wayne On 11/2/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote: > We have a somewhat unusual requirement using the client-side version > <t:inputCalendar>: We have a requirement that the date shown when a > page first comes up be 12/31/9999, but, if the user clicks on the > calendar icon, we want the calendar to display today's date. In other > words, if the user leaves the date alone, it remains 12/31/9999, but if > the user clicks on the calendar icon, we don't want to force the user to > scroll back from year 9999 all the way back to 2005 to pick the date. > > Our calendar component has readonly="true" to force the user to click on > the calendar icon. > > My first thought was to use the onclick event that is defined for the > component to somehow change the date to the current date on the fly > through JavaScript. However, the onclick event apparently fires only if > readonly="false" and only if the user clicks on the text box (not the > calendar icon). > > Any suggestions on how I can intercept a click event on the calendar > icon itself? Or another way to get the date in the pop-up to be the > current date even if the original value for the date was 12/31/9999? > > - Brendan >

