Ah... That's a good idea...hadn't thought about that route. _____
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Nathanson Sent: Wednesday, September 26, 2007 11:40 AM To: [email protected] Subject: [jQuery] Re: Building my own datepicket - limting clicks to only two? Andy, on the click event I think you would have to: - check to see if they are toggling from off to on - if they are, and there are already two "on" days, return false You can do this by checking the size of the jQuery object that is returned when selecting all "on" days (pseudo code follows): if ( clicked day is "off" && $(".onclass").size() >= 2 ) { return false; } -- Josh ----- Original Message ----- From: Andy Matthews <mailto:[EMAIL PROTECTED]> To: [jQuery] <mailto:[email protected]> Sent: Wednesday, September 26, 2007 6:46 AM Subject: [jQuery] Building my own datepicket - limting clicks to only two? I'm building a datepicker which will only display the last 2 complete months. I'd like the user to be able to click to select any two days in two calendars and load a date range. The catch is that I want to limit it to two clicks only. Once the second click has been made, you either have to unselect one of the days, or load the date range. How might I go about doing this? ____________________________________ Andy Matthews Senior ColdFusion Developer Office: 877.707.5467 x747 Direct: 615.627.9747 Fax: 615.467.6249 [EMAIL PROTECTED] www.dealerskins.com <http://www.dealerskins.com/>
<<dealerskinslogo.bmp>>

