In general it is a bad idea to use any of the javascript calls that references any standard app features.  These can and do change frequently and might have side effects that are hard to track down.

To get the datePicker the best solution right now is to use inputField and then use an empty SObject with a date field to store the value for you.

Visualforce

<apex:inputField value=”{!proxyObject.closeDate}”/>

Controller

Opportunity o = new Opportunity();
public Opportunity getProxyObject() { return o; }

then in your controller when you need to access the date you ask for o.closeDate.

Source : Salesforce Community