[SalesForce] DatePicker Issue

I have two text field:

One normal text field that accepts numbers.

<apex:inputField value="{!FinancialAssCont.Down_Payment__c}" styleClass="form-control downpaymentAmount" onblur="checkValidQuantity(event);" />

Another field is a date Type field and on focus it opens datePicker control :

<apex:inputField value="{!FinancialAssCont.Initial_Date__c}" styleClass="form-control calendar_icon inital-date cal-text" onblur="copyInitialDate(this);" />

This is the algo of onblur event:

function checkValidQuantity(evt){
   if(inValidQuantity){
       showJqueryPopup();
   }

}

Issue on IE11:
When I enter the Invalid Quantity, I get a jquery popup. But the datefield also receives the focus which opens the datePicker. So i have at a time popup as well as datPicker open. I want to hide the datePicker when popup is open.

Best Answer

This seems like common problem :

Can you try below :

Include the Javascript snippet mentioned below after the page tag.

<apex:page>
<script>function setFocusOnLoad() {}</script>
<!-- further content -->
</apex:page>
Related Topic