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
test269test269 

Displaying calender beside the datefield in vf page

Hi all,

  i want to display the calender beside the text box in vf page.Any one can u please help me .

 

Thanks in advance.

Best Answer chosen by Admin (Salesforce Developers) 
Navatar_DbSupNavatar_DbSup

Hi,

Try the below code snippet as reference:

 

<Apex:page >
<apex:form >
<script>
function DynamicDatePicker(d_id)
{
DatePicker.pickDate(false,d_id.id,false);
}
</script>
<apex:inputText id="time" onfocus="DynamicDatePicker(this);" onchange="checkDateFormatt(this.id);" size="20" disabled="false" style="width:150px;">
</apex:inputtext>

</apex:form>
</Apex:page>

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

 

All Answers

Navatar_DbSupNavatar_DbSup

Hi,

Try the below code snippet as reference:

 

<Apex:page >
<apex:form >
<script>
function DynamicDatePicker(d_id)
{
DatePicker.pickDate(false,d_id.id,false);
}
</script>
<apex:inputText id="time" onfocus="DynamicDatePicker(this);" onchange="checkDateFormatt(this.id);" size="20" disabled="false" style="width:150px;">
</apex:inputtext>

</apex:form>
</Apex:page>

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

 

This was selected as the best answer
Gunners_23Gunners_23

could you pls add how you would evaluate the date with onchange event and what DatePicker.pickDate(false,d_id.id,false);

 

function is doing

PremanathPremanath

Good Work Nvtar

test269test269

thanks for  ur replay.It helps me a lot