w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
datepicker elements raising undefined or null reference in Internet Explorer only

I found a workaround for this issue, in case any of you get it someday.

The problem is that the dtStart and dtEnd elements were invoking the datepicker() by class name as shown below:

<script type="text/javascript">
    $(function () { $('.datepicker').datepicker();});
</script>

what I did is adding an ID to the dtStart and dtEnd elements and invoke them by ID instead of class in the next way instead:

<script type="text/javascript">
    $(function () { $('#dtStart').datepicker(); $('#dtEnd').datepicker();
});
</script>

In theory it should work in both ways, but with this the issue is gone and it works for all browsers now..





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.