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
NervosaNervosa 

Datepicker - a little problem in inputText.

Hi there!

There is a little problem with using DatePicker in inputText component on a VF page. I implement it like this:

 

    <apex:inputText value="{!NewItemReleaseDate}"  label="Release Date" onfocus="DatePicker.pickDate(false, this, false);" />

 Calendar appears and date is picked well but it doesn't appear in inputText. Why? I can't see the solution. May be you do?

 

Thanks in advance.

Best Answer chosen by Admin (Salesforce Developers) 
Saikishore Reddy AengareddySaikishore Reddy Aengareddy

instead of "this" you should put the actual path of Id for that inputtext field... this might help 

 

<apex:page controller=’test’ id=”page1”>
<apex:form id=”form1”>

<apex:inputText  value="{!newItemReleaseDate}" id="input1" onfocus="DatePicker.pickDate(false, 'page1:form1:input1', false);" />

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

All Answers

Saikishore Reddy AengareddySaikishore Reddy Aengareddy

instead of "this" you should put the actual path of Id for that inputtext field... this might help 

 

<apex:page controller=’test’ id=”page1”>
<apex:form id=”form1”>

<apex:inputText  value="{!newItemReleaseDate}" id="input1" onfocus="DatePicker.pickDate(false, 'page1:form1:input1', false);" />

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

This was selected as the best answer
NervosaNervosa

Thank you very much.

 

It was enough to assign ID's to page, form and inputDate component =)

Ankushs@lesforceAnkushs@lesforce
@Saikishore Reddy Aengareddy   thanks A lot