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
Sivaram KongaraSivaram Kongara 

How can i create Custom date field in Visual force page without using custom Controller

ANUTEJANUTEJ (Salesforce Developers) 
Hi Sivaram,

I see that there is already an OOB input field to which you can assign type as the date in VF page is there any reason for not using it and also can you elaborate on creating a custom date field in Visualforce.

Additionally, you can try checking: https://salesforce.stackexchange.com/questions/118109/how-to-use-custom-date-fields-in-visualforce-page

Documentation for input field on VFpage: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_input.htm

Thanks
Dushyant SonwarDushyant Sonwar
You can use jquery datepicker for the datepicker if you don't want to use custom controller
Below is the example
<apex:page>
<head>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"/>
  <link rel="stylesheet" href="https://jqueryui.com/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>
  <script>
  $( function() {
    $( ".datepicker" ).datepicker();
  } );
  </script>
  </head>
  <apex:form>
	<apex:inputText styleClass="datepicker" />
  </apex:form>
  </apex:page>

 
Dushyant SonwarDushyant Sonwar


If you want to use cdn files then have to use https 
Code After Correction
 

<apex:page>
<head>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"/>
  <link rel="stylesheet" href="https://jqueryui.com/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>
  <script>
  $( function() {
    $( ".datepicker" ).datepicker();
  } );
  </script>
  </head>
  <apex:form>
	<apex:inputText styleClass="datepicker" />
  </apex:form>
  </apex:page>