Having issues with the popup calendar feature after CF11 update 12 or CF2016 update 4? There's a fix
The issue is discussed in a CF bug entry, CF-4198570, but since I've had a couple of customers recently ask for help on it, I thought I'd bring it up in a blog post here.
TLDR: you just need to obtain a special hotfix jar file, either the one for CF11 or the one for CF2016. (If you find that just clicking the link shows you gibberish in your browser, right-click the link and save the file instead.)
Put that saved jar in the lib\updates folder for your instance(s), and restart CF, and the problem will go away.
For more on the matter, as always, see below. :-)
Some code to demonstrate the feature and problem
<cfinput type="datefield" name="test" mask="YYYY/MM/DD">
<cfinput type="submit" name="submit">
When things work, once you select a date it should fill it into the field (whose format can be controlled with that MASK attribute).
When the problem is happening, you'll find first that the field is populated with a mask (unexpectedly), and more important it is NOT filled in when you select one from the calendar. Also, you may notice that when you click in the date input field, you may see some additional icons within it on its right side, in addition to the little calendar icon that should appear just outside of it. (The problem seems to happen in Chrome more often than other browsers, at least for some users I've talked with.)
Some other points
Before wrapping up, here are some other points that may interest some readers:
- If you're not clear about the location of where to put the update jar file, for a typical Windows installation the CF2016 location would be C:\ColdFusion2016\cfusion\lib\updates. You'll see that that folder holds the jar file for whatever update may have been previously applied. Again, restart CF after making that change before testing if the problem is fixed.
- I'd point out that this issue is NOT related to the recent removal of the YUI library, pulled in the refreshed installer for CF2016 released in December 2016, which can affect several UI tags. Note that for that problem, the page I just linked to offers a downloadable YUI library that you can "put back in place". (This is not the post to talk about that curious decision by Adobe, though I will note that they had announced deprecation of such things in CF2016.)
- Note that the bug report's title indicates that this is a CF11 problem, but it does indeed apply to CF2016. And I can confirm that it was introduced in CF2016 update 4, CF11 update 12.
- It may help for some to hear this: the CF update mechanism (in CF10 and above) does now automatically remove any manually placed hotfix files (like for this bug), so you don't need to worry about this "fix file" remaining in the lib/updates folder if/when some future update is applied.
- That said, it would be nice to hear confirmation from Adobe that this fix will be included in the next update to both releases. (The "fixed in build" field on the top right here is currently empty as of this date I am writing.)