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
thsrthsr 

<apex:inputtext>でカレンダーを出す方法

<apex:inputtext>でカレンダーを出す方法について、ご存知の方がいらっしゃいましたら、ご教授いただけれますか?

よろしくお願いいたします。

 

やりたいのはあるボタンを押したら、 <apex:inputtext>に日付が表示され、そして隣のカレンダーで選択できるようにしたいのですが。。。

Best Answer chosen by Admin (Salesforce Developers) 
HikeyHikey

inputTextでカレンダーを表示して入力するにはカレンダーを自作するしかないと思います。 

 

ご存知かもしれませんが、あるオブジェクトのDate型項目であればinputFieldを利用することでカレンダー

入力ができるようになります。

 

下記は商談オブジェクトの完了予定日を利用した例です。

<apex:page standardController="Opportunity"> <apex:form> <apex:inputField value="{!Opportunity.CloseDate}"/> </apex:form> </apex:page>

 

入力画面用にカスタムオブジェクトを作成してその中にDate型のカスタム項目を利用する方法を

検討されてはいかがでしょうか。