[VisualForce] Block Auto Focus on DatePicker

Spread the love

This little post is born to remember how to avoid auto focus on Visualforce page of a DatePicker field, in case it is the first “focusable” field in the page:

 
     //avoid autofocus on date pickers
     function setFocusOnLoad() {}

This is something I have found online some weeks ago, but I can’t remember the original post. So if you claim the paternity of this fix, I’ll be glad to add a reference link.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.