You need to sign in to do that
Don't have an account?

How to disable the date picker popup default open when page load
Hi ,
I developed a visualforce page with date field. when i opened this page the date picker popup opened default from date field. i need to just hide this popup if i click that textbox need only open this popup..Have you any solution for this.
Thanks
Rajii
The popup is being shown because by default the date field is being focussed as soon as the page is loaded. write a javascript or jquery to focus on some other element when the page loads.
I am pretty sure your date control is the first control on the page so focus is on it. Either replace it with second control or set defult foucs to some other control.
set focus from javascript like this
document.yourform.fieldname.focus();
Avoid using javascript or JQuery as it may lead to some misbehaver. Just change the position of your date field.
Thanks
Ankit Arora
Blog | Facebook | Blog Page
Yes chagning the position of date field will be the best option. But user experience should be given more priority. As for Javascript or jQuery, it will never misbehave unless you code it poorly.
Just add the below lines in your Visualforce page
<Script>
function setFocusOnLoad() {}
</Script>
Thanks @VVKrishna - your solution is simple and works perfectly for me.
Thanks VVKrishna for the solution..This worked greatly..Just curious about how it worked..