My contact for is using 2 date pickets, Check-in/Check-out dates.

When I fill out the form the dates show fine in the debug page. I receive and email with a link to view the lead and the dates are not there.


<li class="input-date1" ><input type="text" id="date1" name="00N80000002myxR" placeholder="Check In" required/></li>
<li class="input-date2"><input type="text"  id="date2" name="00N80000002myxS" placeholder="Check Out" required/></li>

This is the debug page date section:

Record Information:

00N80000002myxR: October/18/2016
00N80000002myxS: October/20/2016

Current Datepicker format:

$( "#date1" ).datepicker({ dateFormat: 'MM/dd/yy' });

And on the Lead page in SalesForce, they are blank. Any ideas, I have tried about 10 different format types, it was working at first but it was confusing the Day and Month so I tried to change it, now even at default settings I get this issue.

3 Answers 3


Web-to-lead uses your organization's locale to try and parse date values, if I remember correctly. Check Setup > Company Profile/Settings > Company Information. If Default Locale is set to English (United States), you'll want to use MM/DD/YYYY format. If your locale is something else, use the correct date format for that locale. Other formats will not be accepted. Also note that the debug output shows 20162016 for the year-- this is obviously not correct, and salesforce.com only allows up to the year 4,000, so you'll want to double-check your code.

  • thanks for the reply. I check and the locale is English(Canadian) I changed the datepicker format to this with the same issue as above: $( "#date1" ).datepicker({ dateFormat: 'MM/dd/yy' }); Again the date shows fine on the debug page but not on the leads page.
    – LukeD1uk
    Commented Oct 30, 2016 at 4:47
  • @LukeD1uk I'm pretty sure you want 'dd/MM/yyyy' instead. It must be a four-digit year, and the day should come before the month.
    – sfdcfox
    Commented Oct 30, 2016 at 4:52
  • Thanks for the suggestion. Tried with the new format still not showing in the leads, also if I do 4x yyyy in the date format it prints the date twice like: "20162016" must have something to do with this error. Ive been banging my head on this for hours.
    – LukeD1uk
    Commented Oct 30, 2016 at 5:00

Date Formatting was the issue. The issue was that the lead was looking for the day and the month in the wrong/different place. If I selected more than 12 where it expected a month, it just wouldn't show the date at all. That's why it was showing in my debug page fine and not in my lead on salesforce.

The working format:

$( "#date1" ).datepicker({ dateFormat: 'dd/mm/yy' });
$( "#date2" ).datepicker({ dateFormat: 'dd/mm/yy' });

If it helps you need to enter dd/mm/yyyy in a format if you're from UK i.e 01/01/2022 on your website. Also I have added placeholder = "dd/mm/yyyy" in my Web to Lead HTML code next to date field to show the format to help customers

Work Required By:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .