+ 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 

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>
	$( function() {
		$( "#datepicker" ).datepicker();
	} );

function copy()
    var n1 = document.getElementById("datepicker");
    var n2 = document.getElementById("00N0j000000QYzw");
    n2.value = n1.value;

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