function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Alok Kumar 17Alok Kumar 17 

unable to get datetimepicker on vf page

Hi all,

I am trying to get datetime picker in html input element on my vf page but i am getting below error:
Uncaught TypeError: Cannot read property 'addEventListener' of null
Uncaught TypeError: Cannot read property 'currentStyle' of null


Because of this i am not able to get date time picker.
can anyone help me in resolving this issue
sandeep sankhlasandeep sankhla
Hi Alok,

Can you share your code so I can help you out ?

Thanks
sunny522sunny522
Hi Alok,
   Go through the sample code and let me know if it helped

<apex:page > <apex:form > <table> <td> Date<br></br><input id="t" name="datee" onfocus="DatePicker.pickDate(false, 't', false);" size="12" tabindex="28" type="text" /><span class="dateFormat" style="display:none">[&nbsp;<a href="javascript&colon;DatePicker.insertDate('', 't', true);" >2/3/2011</a>&nbsp;]</span></td> </table> </apex:form> </apex:page>
 
Meryem FRQMeryem FRQ
Hello, 

This is a known issue on Salesforce, you have to  change your VF page API to 29 or under.
https://success.salesforce.com/issues_view?id=a1p300000008XU5AAM

KR
Meryem
Chinmay GolegaonkarChinmay Golegaonkar
Hi,

After changing the API to 29, Still i am getting the same issue. Any other workaround ?
 
madhu_ramadhu_ra
Had the same issue regardless of the API version. Just make sure you don't have set "StandardStyleSheet='false'"