
<!--<script>
 // to remove many digits after the period
    $(function(){$(".ValSpan").each(function(){$(this).html(AddCommas(parseFloat($.trim($(this).text())).toXFixed(3))).animate({opacity:1})})})
</script>-->
<style>
    .table thead tr >th{
        background-color: #ed9421;
        color:#fff;
    }
    .table thead tr th[class*='sorting_'] {
        color: #FFFFFF;
    }
    .bg-master-lighter {
        border:none;
        background-color:#fff;
        border-top:1px solid #ddd; 

    }
    .datepicker thead tr .dow {
        color:#4c0870 !important;
    }
    .datepicker table tr td.day:hover {
        background: #4c0870 !important;
        color:#fff;
    }
    .datepicker table tr td.active {
        background-color: #4c0870 !important;
    }
    .datepicker thead tr .datepicker-switch {
        color: #4c0870  !important;
        font-size: 13px;
    }
    .datepicker table tr td span.active {
        background-color: #4c0870 !important;
    }
    .datepicker table tr td span:hover {
        background-color: #4c0870 !important;
        color:#fff;
    }
    datepicker thead tr .next:before, .datepicker thead tr .prev:before {
        color: #4c0870 !important;
        font-family: 'FontAwesome';
        font-size: 10px;
    }
    .datepicker thead tr .next:before, .datepicker thead tr .prev:before {
        color: #4c0870 !important;
        font-family: 'FontAwesome';
        font-size: 10px;
    }
</style>
<div class="container-fluid container-fixed-lg bg-white">
    <div class="panel panel-transparent">
        <div class="panel-heading">
            <div class="panel-title"> <?php print CommonLanguage::getMessage('daily_checkup_list'); ?></div>
            <div class="pull-right">
                <div class="col-xs-12">
                    <div class="form-group form-group-default input-group col-md-3 pull-right" >
                        <label class="fade"><?php print CommonLanguage::getMessage('Date'); ?></label>
                        <input id="Checkup_Date" name="Checkup_Date" class="form-control"  value="<?php echo($today); ?>" aria-required="true" aria-invalid="false">
                        <span class="input-group-addon bg-success-darker"><i class="fa fa-calendar"></i></span>
                    </div> 

                </div>

            </div>
            <div class="clearfix"></div>
        </div>
        <div class="panel-body">
            <table class="table table-bordered table-hover demo-table-search" id="tableWithSearch" >
                <thead>
                    <tr>
                        <th class="text-center" style="width:10%" ><?php print CommonLanguage::getMessage('reg_nb'); ?></th>
                        <th class="text-center" style="width:10%" ><?php print CommonLanguage::getMessage('maker'); ?></th>
                        <th class="text-center" style="width:5%" ><?php print CommonLanguage::getMessage('km_in'); ?></th>
                        <th class="text-center" style="width:5%" ><?php print CommonLanguage::getMessage('km_out'); ?></th>
                        <th class="text-center" style="width:10%" ><?php print CommonLanguage::getMessage('trip_distance'); ?></th>
                        <th class="text-center" style="width:10%" ><?php print CommonLanguage::getMessage('fuel'); ?></th>

                    </tr>
                </thead>
                <tbody>

                </tbody>
            </table>
        </div>
    </div>
</div>

<script>
    var KMLang = <?php echo json_encode(CommonLanguage::getMessage('km')); ?>,
            title = <?php echo json_encode(CommonLanguage::getMessage('daily_checkup_list')); ?>,
            LLang = <?php echo json_encode(CommonLanguage::getMessage('L')); ?>;

    $(function () {

        RebuildDataTable(title, [0, 1, 2, 3, 4, 5], 'GarageAjax/DailyCheckupListRequest', {Checkup_Date: $("#Checkup_Date").val()})

        $("#Checkup_Date").datepicker({autoclose: true}).on("changeDate", function (e) {
            RebuildDataTable(title, [0, 1, 2, 3, 4, 5], 'GarageAjax/DailyCheckupListRequest', {Checkup_Date: $("#Checkup_Date").val()})


        })
    })





</script>