Index: /trunk/prototype/modules/calendar/js/helpers.js
===================================================================
--- /trunk/prototype/modules/calendar/js/helpers.js	(revision 7993)
+++ /trunk/prototype/modules/calendar/js/helpers.js	(revision 7996)
@@ -259,6 +259,5 @@
 	    text: false
 	}).click(function () {
-        var participant = DataLayer.get('participant' , $(this).parents('li').find('[type=checkbox]').val());
-	    DataLayer.remove('participant', participant.id);
+	    DataLayer.remove('participant', $(this).parents('li').find('[type=checkbox]').val());
 	    if($(this).parent().find('.button.delegate').hasClass('attendee-permissions-change-button')){
 		removeOthers();
@@ -268,9 +267,9 @@
 		blkAddAtendee.find('option[value=1]').attr('selected','selected').trigger('change');
 	    }
+			
 	    $(this).parents('li').remove();
 			
 	    if(blkAddAtendee.find(".attendee-list li").length == 1)
 		blkAddAtendee.find("li.not-attendee").removeClass('hidden');
-        delete attendees[participant.user];
 	})
 	.addClass('tiny disable ui-button-disabled ui-state-disabled')
@@ -457,4 +456,6 @@
     }
     );
+	
+		
 }
 
@@ -556,4 +557,13 @@
 }
 
+
+dateSameValue = function(){
+    UI.dialogs.addEvent.find('input.start-date').datepicker({
+        onSelect : function (selectedDate){
+            $(".end-date").val(selectedDate);
+        }
+    });
+}
+
 DataLayer.render( path+'templates/event_repeat.ejs', {
     event:objEvent
@@ -561,7 +571,11 @@
 
     UI.dialogs.addEvent.find('#calendar_addevent_details3').html(repeatHtml);
+
+    dateSameValue();
     $(".date").datepicker({
 		dateFormat: User.preferences.dateFormat.replace(/M/g, 'm').replace(/yyyy/g, 'yy')
-		});
+	});
+
+
 		  
     if(objEvent.repeat) 
@@ -960,11 +974,40 @@
 });
 
+
+
+
+dateSameValue();
+
 var dates = UI.dialogs.addEvent.find('input.date').datepicker({
     dateFormat: User.preferences.dateFormat.replace(/M/g, 'm').replace(/yyyy/g, 'yy'),
     onSelect : function( selectedDate ){
-	updateMap();
+	   updateMap();
     }
 });
-//if(path == ""){
+
+
+
+if($("#calendar").fullCalendar('getView').name == "month"){
+
+    UI.dialogs.addEvent.find('input.start-time').timepicker({
+        onSelect: function(selectedDateTime){
+            var time = selectedDateTime.split(":");
+            var hh = time[0];
+            var mm = time[1];
+           
+            dt = new Date();
+            dt.setHours(hh, mm);
+            dt.addMinutes(30);
+
+            var minutes = dt.getMinutes().toString();
+            var hours = dt.getHours().toString();
+            minutes = minutes.length == 1 ? "0"+minutes : minutes;
+            var newHours =  hours + ":" +minutes;
+            UI.dialogs.addEvent.find("input.end-time").val(newHours);
+        }
+    });
+
+}
+
 UI.dialogs.addEvent.find('input.time').timepicker({ 
     closeText: 'Ok',
@@ -1029,9 +1072,9 @@
 var attendeeHtml = DataLayer.render( path+'templates/attendee_add.ejs', {
     event:objEvent
-});
+});		
 	
 // load template of attendees
 var blkAddAtendee = UI.dialogs.addEvent.find('#calendar_addevent_details6').append(attendeeHtml);
-if(objEvent.attendee.length)
+if(objEvent.attendee.length) 
 	 	callbackAttendee(); 
 /**
@@ -1569,13 +1612,11 @@
 	DataLayer.render( 'templates/preferences_calendar.ejs', {
 	    preferences:User.preferences, 
-	    calendars: Calendar.calendars,
-        signatureOf : Calendar.signatureOf
+	    calendars: Calendar.calendars
 	    }, function( template ){
 	    var tabPrefCalendar = jQuery('#preference_tab').html( template ).find('.preferences-win');
 		
-	    tabPrefCalendar.find('select[name="defaultCalendar"] option[value="'+User.preferences.defaultCalendar+'"]').attr('selected','selected').trigger('change');
-        tabPrefCalendar.find('select[name="dafaultImportCalendar"] option[value="'+User.preferences.dafaultImportCalendar+'"]').attr('selected','selected').trigger('change');
-
-        DataLayer.render( 'templates/timezone_list.ejs', {}, function( timezones_options ){
+	    tabPrefCalendar.find('option[value="'+User.preferences.defaultCalendar+'"]').attr('selected','selected').trigger('change');
+		
+	    DataLayer.render( 'templates/timezone_list.ejs', {}, function( timezones_options ){
 		tabPrefCalendar.find('select[name="timezone"]').html(timezones_options).find('option[value="'+User.preferences.timezone+'"]').attr('selected','selected').trigger('change');
 	    });
