{"id":1828,"date":"2009-11-06T14:51:57","date_gmt":"2009-11-06T09:51:57","guid":{"rendered":"http:\/\/www.chiragmehta.info\/chirag\/?p=1828"},"modified":"2009-11-06T14:53:34","modified_gmt":"2009-11-06T09:53:34","slug":"salesforce-date-calendar-picker-in-visualforce","status":"publish","type":"post","link":"https:\/\/www.chiragmehta.info\/chirag\/2009\/11\/06\/salesforce-date-calendar-picker-in-visualforce\/","title":{"rendered":"Salesforce &#8211;  Date (Calendar) Picker in VisualForce"},"content":{"rendered":"<p>In general it is a bad idea to use any of the javascript calls that references any standard app features.\u00a0 These can and do change frequently and might have side effects that are hard to track down.<\/p>\n<p>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.<\/p>\n<p><strong>Visualforce<\/strong><\/p>\n<blockquote><p>&lt;apex:inputField value=&#8221;{!proxyObject.closeDate}&#8221;\/&gt;<\/p><\/blockquote>\n<p><strong>Controller<\/strong><\/p>\n<blockquote><p>Opportunity o = new Opportunity();<br \/>\npublic Opportunity getProxyObject() { return o; }<\/p><\/blockquote>\n<p>then in your controller when you need to access the date you ask for o.closeDate.<\/p>\n<p>Source : <a href=\"http:\/\/community.salesforce.com\/sforce\/board\/message?message.uid=80966\">Salesforce Community<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In general it is a bad idea to use any of the javascript calls that references any standard app features.\u00a0 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[169],"class_list":["post-1828","post","type-post","status-publish","format-standard","hentry","category-salesforce","tag-salesforce","post-preview"],"_links":{"self":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts\/1828","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/comments?post=1828"}],"version-history":[{"count":2,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts\/1828\/revisions"}],"predecessor-version":[{"id":1830,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts\/1828\/revisions\/1830"}],"wp:attachment":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/media?parent=1828"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/categories?post=1828"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/tags?post=1828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}