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.