Glad you sorted it, Mike. BTW, speaking of providing date entry mechanisms, some may have missed that CF 8 added something new. It's quite easy to use:
<cfform> Some Date: <cfinput type="DateField" name="somedate"> </cfform> This creates a simple and fairly nice popup calendar (HTML-based). Don't confuse this with the older CFCALENDAR which came out in CF 7. That created a calendar (flash or html) that was not a popup and required form submission to enter the date. This new one is all HTML and does just what most would expect: pops up a small calendar, the user selects a date, and the field is populated. It's got a lot of extensibility (many attributes and values to control many things, though none are needed to create a basic popup calendar). Now, let me head off some discussion. Sure, some have found limitations with the implementation, though for many it's quite adequate. There may be things some wish it did but it doesn't (but check out all the attributes), or thing that it does that some wish it wouldn't. Some may wish it allowed selection of multiple dates (it doesn't), others may wish it was based on a different underlying ajax framework (it uses the Yahoo UI library), or some may not like the weight of the libraries Adobe includes in pages using the CF8 Ajax tools (which isn't huge, and is cached after the first visit, but size can be a sensitive issue for some people). I'm just saying, give it a try. If it works, great. I'll say as well that some may not like that you have to run it inside of CFFORM. There too, I wonder if the concern may be overstated sometimes. CFFORM (just using it for HTML) has in fact evolved quite a bit in each of CF 6, 7, and 8. I think some of its ill-repute is ill-deserved, and some of its new features are pretty interesting (like the submitonce validation). In fact, I wrote a Tipical Charlie column (on the back page of the FAQU) a few issues ago where I highlighted some of the ways CFFORM has changed for the better. The article is available online at http://www.carehart.org/articles/faqu_4_tips_cfform.pdf. Still, I realize some may not be persuaded. I'm just pointing things out for any to whom they may be useful. If you're still an avowed CFFORM hater, no worries. :-) Just thought of it with respect to Mike's challenge. /charlie -----Original Message----- From: cfaussie@googlegroups.com [mailto:cfaus...@googlegroups.com] On Behalf Of Mike Kear Sent: Friday, February 20, 2009 12:07 AM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Validating dates ... what's the trick? AH! Ok i see what the difference is. You're giving it a string, not a date object. That's where I was falling over - i was trying ot give it a date object, and of course you can't create an invalid date object. So createdate was throwing an error before it even got to the validation function. Thanks. But the try/catch works too :) Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On Fri, Feb 20, 2009 at 4:03 PM, Adam Chapman <a...@portplus.com> wrote: > > Hi Mike, > > I used to use the 3 dropdowns method.. (now using jquery datepicker) but > used "mmm" for the month value. > > Then validate something like this > > isDate("#day#-#month#-#year#") which evaluates to isDate("31-Feb-2009") > > There was no confusion between day and month this way.. > > Regards, > Adam > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---