ASP.NET Calendar Tutorial - Custom DateRange

When date in first calendar is selected, second takes the same date.

Date 1:  


Date 2:  


This feature can be implemented in multiple calendars using the followign JS code:
Javascript:

<script type="text/javascript">
        function onDateChange(sender, selectedDate) {
		var formattedDate = sender.formatDate(selectedDate, "M/d/yyyy");
		var date = formattedDate.split('/');
		        
		var year = date[2];
		var month = date[0];
		var day = date[1];
		
		EndCalendar.setDate(new Date(year, month-1, day), new Date(year, month-1, day));
		
        }
        
</script>