 			$('#addWeekModal').modal('show')
 			$('#addWeekModal').on 'hidden.bs.modal', ->
 				wrs -> FlowRouter.setQueryParams addWeek: undefined
+
+			weeks = Weeks.find
+				projectId: FlowRouter.getParam('projectId')
+				start: $gte: parseInt moment(new Date).isoWeekday(1).format 'YYYYDDDD'
+			,
+				fields: date: 1
+				sort: start: 1
+
+			weeks = weeks.fetch().map (w) -> w.date
+			nextWeek = new Date moment(weeks[weeks.length - 1]).add(1, 'week').format()
 
 			$weekPicker = $('#datepicker-week')
 

					$(this).datepicker('clearDate').datepicker('setDates', weekDates)

					$weekPicker.data('updating', false)
			.datepicker('setDate', new Date)

Template.addWeekModal.events



		if project && project.tags
			for tag in project.tags when tag.templates && tag.templates.length > 0
				return project

			_id: project._id, noTemplate: true

Template.addWeekModal.onCreated ->

