Cannot initialize Calendar Value when attached to input

I’ve just upgraded from 2.6 to 3.5 and you can no longer initialize a calendar value that is attached to a form field. However, if I attach the calendar to a div it initializes just fine.

<title>Test</title>

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content="">
<meta name="description" content="">
	<script src="../../dhtmlxCalendar/codebase/dhtmlxcalendar.js"></script>
		  <tr>
	  		<td class="small_text">Hire Date:</td>
				<div id="calendar_here"></div>
				<td><input type="text" id="employee_hire_date" style="width: 100px;" readonly="true" onfocus=""></td>
			</tr>

Well it appears you can initialize the value by setting the value of the attached form field:

The trouble with this is that in 2.6 you could set the value of a calendar using a js time object like this:

															hire_date.setTime(tmp_time.getTime()+(tmp_time.getTimezoneOffset()*60*1000));

hire_date_calendar.setDate(hire_date);

And have the calendar object keep track of the time without actually displaying the time on the popup calendar. It doesn’t appear that this isn’t possible any longer for two reasons. First, you cannot set the value of a calendar attached to an input field directly, secondly, you can’t set the time without actually displaying the time.

Can this be resolved or can the functionality of the old version calendar be put back in place?

To reproduce your isue we need completed demo.
docs.dhtmlx.com/doku.php?id=othe … leted_demo

I know this is an old one but I know why this happens.

The calendar is indeed initialised to the custom date but, when the user clicks into the text input setDate is called again on the calendar.
This time it looks for the value of the input (which is blank) so the calendar defaults back to a new Date object.