You need to sign in to do that
Don't have an account?
sfdc007
Date picker field in VF Page
Hi,
I need help on the following requirement in vf page
i have a Visualforce page where i have a free text box where i have to enter date using date picker for some reason <apex:Input type ="date"> is not working
let me know how to achieve this requirement
Thanks in Advance
I need help on the following requirement in vf page
i have a Visualforce page where i have a free text box where i have to enter date using date picker for some reason <apex:Input type ="date"> is not working
let me know how to achieve this requirement
Thanks in Advance
Please use <apex:inputField value={! Your Date Field} /> ,Datepicker will pop up automatically then if it is date field.
Let us know if it helps.
Here is a similar question.
https://developer.salesforce.com/forums?id=906F000000097bvIAA
Donot forget to select best answer to make our efforts visible in the developer forum.
Please mark this as solution by selecting it as best answer if this solves your problem, So that if anyone has this issue this post can help
Please use the below code. This requires jQuery and datePicker field generates if you do not have field in the object.
<apex:page >
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"/>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css"/>
<script>
$(function() {
$( "#datepicker" ).datepicker();
});
</script>
Date: <input type="text" id="datepicker"/>
</apex:page>