include mixins

doctype html
html
	include header
	link(href="/stylesheets/bootstrap-datepicker.min.css", rel="stylesheet")
	script(src='/javascripts/bootstrap-datepicker.min.js' )
	script(src='/javascripts/bootstrap-datepicker.de.min.js' )
	body(style="overflow: hidden;")
	
			
		.container-horizontal(style="overflow: hidden;")
			
			.flex-one(style="overflow: hidden; height: 100%;")
				
				.container-vertical
      
					.flex-zero
						+nav("PfarrInfoSystem", "dropdown_menu")
						
						.container-fluid
							+messageview(messages)
							
							button(class="btn btn-success btn-xs", type="button", id="change_date", onclick='location.assign("/#{pcalview}/#{date}");') 
								span(class="glyphicon glyphicon-ok", aria-hidden="true")
								span 
								span Übernehmen
							
							//- http://eternicode.github.io/bootstrap-datepicker/
							#datepicker(data-date=date)
							
		script.
			$('#datepicker').datepicker({format: "yyyy-mm-dd", language: "de", calendarWeeks: true, todayHighlight: true});
			$("#datepicker").on("changeDate", function(event) {
					var d = $("#datepicker").datepicker('getFormattedDate');
					console.log(d);
						
					$("#change_date").attr("onclick",'location.assign("/#{pcalview}/'+d+'");');
				});
		
		
