Microsoft JScript Error when selecting a Date in IE8

I am using the Calendar in a Grid, and when I double click the cell to get the popup calendar, I get the following error: :question:

Microsoft JScript runtime error: Object doesn’t support this property or method.

The line of code that is highlighted is:
var time = d.getTime();

The “watch” value for d is “Undefined Value”. I checked Date() and it is a valid date. Here is the full function from dhtmlxcalendar.js

this.setDate = function(d) {
	if (d === "") d = new Date();
	if (!(d instanceof Date)) d = this._strToDate(d,false);
	
	var time = d.getTime();
	
	// out of range
	if (this._isOutOfRange(time)) return;
	
	this._activeDate = new Date(time);
	this._drawMonth(this._activeDate);
	this._updateVisibleHours();
	this._updateVisibleMinutes();
}

Any help would be greatly appreciated, or anyway to not look at time as something that can be selected would be better.

Unfortumnately the issue can’t be reconstructed.
Try to download the newest version of calendar.
If issue still occurs - please provide any kind of sample of yiour code to reconstruct an issue.

Good day

The calendar works perfect except if I go to a different page. I am using master page in asp.net and the calendar is on the master page.

<script type="text/javascript" src="Scripts/dhtmlxcalendar.js">
</script>

<style type="text/css">
	#calendar{
		border: 1px solid #909090;
		font-family: Tahoma;
		font-size: 12px;
	}
</style>
<script type="text/javascript">
    var myCalendar;
    function doOnLoad() {
        myCalendar = new dhtmlXCalendarObject("calendar");
    }
</script>

And here is the TextBox that is used.

<asp:TextBox ID=“calendar” runat=“server” Width=“70px”
ontextchanged=“calendar_TextChanged” AutoPostBack=“true” />

Please help why I get this error and why it does not work when i’m on a different page except Default page.

Hello,
please clarify what error do you have, a browser console must contain an error message

It gives me an error stating dhtmlXCalendarObject is not defined.

Hello
If error contains “not defined” - you didn’t include necessary library files of calendar. Please, check it