My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 810: set minTime and maxTime of calendar on change of views
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Feb 2011


Sign in to add a comment
 
Reported by meetjeni...@gmail.com, Jan 27, 2011
Hello,

I want to dynamically change the maxTime and minTime using ajax+javascript on some click event of "Week View Button" and "Day View Button". Is it possible?

i.e. if i change my view to "Week View" it should set different minTime & maxTime(say for e.g. from 10am to 3pm) AND if i change it to "Day View" it should change  set to different minTime & maxTime (for e.g. from 8am to 5pm).

Also if we navigate through "Day View" i.e. suppose if i am on "Day View" looking  for an agenda of date "Thursday, Mar 3, 2011" and if i click on next button it will navigate to next day "Thursday, Mar 4, 2011", for this again i want to set some different maxTime & minTime.

I tried following code, adding click event for "next button". but its not working, 

 $('#calendar').fullCalendar('next').click(function() {		
	var getD = $('#calendar').fullCalendar('getDate');		
	$.post("calendar/getMaxMinTime",{'getD':getD},
	function(data)
	{	
		var spl = data.split('##'); // "8:00am##6:00pm"
		$('#calendar').fullCalendar({
		   minTime: data[0],
		   maxTime: data[1]
		});
			
	});

});


Please help me.

Feb 15, 2011
Project Member #1 adamrs...@gmail.com
though it is undocumented, you can use a "View Option Hash" to make minTime/maxTime different across your week/day views:
http://arshaw.com/fullcalendar/docs/views/View_Option_Hash/

if you need more sophisticated behavior than that, it would involve setting the minTime/maxTime options dynamically in a callback somewhere, which is currently not possible (see https://code.google.com/p/fullcalendar/issues/detail?id=293)
Status: Done
Sign in to add a comment

Powered by Google Project Hosting