+ 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,
AnkaiahAnkaiah (Salesforce Developers) 
Hi Rubel,

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


If this helps, please mark it as best answer.


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

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

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