function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sameer VitsSameer Vits 

I have a web to lead form. I want to use datepicker in that form instead of date as text type.

I have a custom date field. I want the date field use a datepicker instead of text and still return value to Salesforce.
Raj VakatiRaj Vakati
Please refer this link. You need to use javascript libraries link Jquery 

https://success.salesforce.com/answers?id=9063A000000l00yQAA​
Copy all JS files into your folder.

Below is header code

 <meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
	<link rel="stylesheet" href="/resources/demos/style.css">
	<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
	<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>

	<link rel="stylesheet" href="JScript/jquery-ui.css">
	<link rel="stylesheet" href="JScript/style.css">
	<script src="JScript/jquery-1.12.4.js"></script>
	<script src="JScript/jquery-ui.js"></script>
	<script>
	$( function() {
		$( "#datepicker" ).datepicker();
	} );
</script>

function copy()
{
    var n1 = document.getElementById("datepicker");
    var n2 = document.getElementById("00N0j000000QYzw");
    n2.value = n1.value;
}
</script>



This you have to add into Form :  onClick="copy()"


This is your text box
Date of Birth: <input type="text" id="datepicker"  ><br/>

 
Raj VakatiRaj Vakati
https://salesforce.stackexchange.com/questions/146493/web-to-lead-date-showing-in-debug-page-but-not-in-the-lead