Bug fix for DatePicker in Sitecore's Web Forms for Marketers



Here’s a simple fix that will improve usability for site administrators, customers and potential employees, for one of the most commonly implemented modules in Sitecore, Web Forms for Marketers (WFFM).

It seems that the DatePicker for Web Forms for Marketers 2.4.0 rev. 140117 doesn’t save in a readable date format when using the “Send Email” action. For instance, if the user selects April, 30, 2014, the default output in the “Send Email” action is “20140430T000000” where the desired output should be “Wednesday, April, 30, 2014”.

This is a problem for website users on any form that includes a date, and for the site administrator/marketer/HR specialist when reading the form’s output. Were this to be sent to a customer or potential recruit, this might not look good for the company.


When inspecting the dll, I noticed that the Adapter’s type is missing. Here’s a fix for the issue:

1) In Visual Studio, create a .cs file named something like CustomDatePicker. This file should extend Sitecore.Form.Web.UI.Controls.DatePicker as shown below:

2) In Sitecore, add a new field type (call it CustomDatePicker) to the content tree in the following location: Sitecore > System > Modules > Web Forms for Marketers > Settings > Field Types. Then specify the Assembly and the CustomDatePicker’s class above.

Skip to sharing