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
rubel rana 6rubel rana 6 

Date picker placeholder

Hello folks,

I have a date picker and it has a default placeholder. I want to change it to dd-mm-yyyy, I added placeholder, but in page, it is not showing. Showing the earlier default text. What can I do?
I added placeholder, like this
<apex:input value="{!fromDate }" type="date" html-placeholder="dd-mm-yyyy" style="width:140px" />


User-added image

Kind regards,
Rubel
AnkaiahAnkaiah (Salesforce Developers) 
Hi Rubel,

Please refer the below article will help you to proceed further on your rquirement.

https://www.geeksforgeeks.org/how-to-set-placeholder-value-for-input-type-date-in-html-5/

If this helps, please mark it as best answer.

Thanks!!


 
rubel rana 6rubel rana 6
Hi @Ankaiah , I get this error after adding the code following the link you have given.

Code;
<apex:input value="{!toDate }" type="text" placeholder="MM/DD/YYYY" onfocus="(this.type='date')"/>

Error
Unsupported attribute placeholder in <apex:input> in SalesDashboard at line 86 column 105