<script type="text/javascript" src="https://formden.com/static/cdn/formden.js"></script>

<div class="panel panel-default">

    <div class="panel-heading">
        <h6 class="panel-title">
            <a href="<?php echo site_url('everbright/teacher_report'); ?>"><i class="fa fa-align-justify"></i></a> 
            Teacher Attendance Report | Generate.
        </h6>
        <a href="<?php echo site_url('everbright/teacher_report'); ?>" class="pull-right btn btn-circle btn-xs btn-default"><i class="fa fa-times"></i>Cancel</a>
    </div>

    <div class="panel-body">
        <form action="<?php echo site_url('everbright/teacher_report_show'); ?>" method="post" class="form-horizontal validate" role="form" enctype="multipart/form-data"> 
            
                      
            <div class="row">
                
				<?php 
                        $query = $this->main_model->teacher();
                        
                        ?>
                <div class="col-md-6">                   
                    <div class="form-group">
                        <label class="col-sm-4 control-label text-right">Teacher<span class="mandatory">*</span></label>
                        <div class="col-sm-8">
                            <select data-placeholder="(:-- Select Teacher --:)" name="user_ID" class="required  select-search">
                               
							   <option value=""></option>
							   <?php foreach($query as $row): ?>
                                <option value="<?php echo $row['tid']; ?>"><?php echo $row['name']; ?></option>
								<?php endforeach; ?>
                              
                            </select>                            
                        </div>
                        
                    </div> 
                </div>
                <!-- ATTN -->
                <div class="col-md-6">                   
                    <div class="form-group">
                        <label class="col-sm-4 control-label text-right">From Date <span class="mandatory">*</span></label>
                        <div class="col-sm-8">
                           <input class="form-control" id="date" name="date" placeholder="MM/DD/YYYY" type="text"/>
                        </div>
                    </div> 
                </div>  
                <!-- SHIPPER -->
				
            </div>
			<div class="row">
                <!-- ATTN -->
                <div class="col-md-6">                   
                    <div class="form-group">
                        <label class="col-sm-4 control-label text-right">From Date <span class="mandatory">*</span></label>
                        <div class="col-sm-8">
                            <input type="text" class="required form-control datepicker" placeholder="To Date" name="fdate" value="<?php echo date('Y-m-d'); ?>">
                        </div>
                    </div> 
                </div>  
                <!-- SHIPPER -->
                <div class="col-md-6">                   
                    <div class="form-group">
                        <label class="col-sm-4 control-label text-right">To Date <span class="mandatory">*</span></label>
                        <div class="col-sm-8">
                            <input type="text" class="required form-control datepicker" placeholder="To Date" name="tdate" value="<?php echo date('Y-m-d'); ?>">
                        </div>
                    </div> 
                </div>                    
            </div>
			 
			
            <div class="form-actions text-right">
                <button type="submit" value="Submit" class="btn btn-primary"><i class="fa fa-check"></i> Submit</button>
            </div>
        </form>
    </div>

</div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/js/bootstrap-datepicker.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/css/bootstrap-datepicker3.css"/>
<script>
	$(document).ready(function(){
		var date_input=$('input[name="date"]'); //our date input has the name "date"
		var container=$('.bootstrap-iso form').length>0 ? $('.bootstrap-iso form').parent() : "body";
		date_input.datepicker({
			format: 'yyyy-mm-dd',
			container: container,
			todayHighlight: true,
			autoclose: true,
		})
	})
</script>