

<?php $__env->startSection('title'); ?>
Edit Voucher Validity
<?php $__env->stopSection(); ?>
<?php $__env->startSection('breadcrumb'); ?>
<ol class="breadcrumb pull-right">
        <li><a href="<?php echo e(route('home')); ?>"><i class="fa fa-dashboard"></i> Home</a></li>
       
        <li class="active">Edit Voucher Validity</li>
      </ol>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>

<div class="container-fluid">
                <!--.row-->
                <div class="row">

                    <div class="col-md-12">
                        <div class="white-box">
                            <h3 class="box-title m-b-0"><i class="icon-settings fa-fw"></i> Edit Voucher Validity</h3>
                            <p class="text-muted m-b-30 font-13" style="height: 5px;"> Update the information </p>
                            <form class="form-horizontal" action="<?php echo e(route('update.voucher.date')); ?>" method="post" autocomplete="off" style="margin-top: 15px;">
                                <input type="hidden" name="id" value="<?php echo e($plan->id); ?>">

                               <?php echo e(csrf_field()); ?>


                               <hr>

                            <div class="col-md-12" style="margin-left: 150px;">

                                <div class="row">
                                   
                                    <div class="col-sm-3">
                                    <div class="form-group" >
                                    
                                    <div class="col-sm-12">
                                    <label for="inputPassword3" class="control-label">Voucher Valid after</label>

                                    <div class="input-group" style="width:150%">
                                    <input  type="date" max="<?php echo e(date('Y-m-d')); ?>" class="form-control"  name="voucher_valid_after" value="<?php echo e($plan->voucher_valid_after); ?>" id="exampleInputuname" >
                                    </div>
                                    </div>
                                    </div>
                                    </div>
                                </div>
                            </div>



                            <div class="form-group m-b-0">
                            <!-- col-sm-offset-4 col-sm-8 -->
                                <div class="col-sm-offset-4 col-sm-2">
                                    <button type="submit" class="btn btn-info waves-effect waves-light m-t-10" style="width: 100%; margin-left: -150px; margin-bottom: 15px;">Save</button>
                                </div>
                            </div>


                            </form>
                        </div>
                    </div>
                </div>
                <!--./row-->
            </div>
<!-- /.container-fluid -->

<?php $__env->stopSection(); ?>

<?php $__env->startSection('js'); ?>
<script type="text/javascript">
    function validatePossessionDate(self) 
    {
       var selectedPossessionDate =  formatDate($('#possession_date').val() );
       var  curentPossessionDate =  formatDate('<?php echo e($plan->possession_date); ?>');

    if(selectedPossessionDate != curentPossessionDate)
    {
        if (confirm('Are You Sure you want to change your possession date? It will effect all previous possession dates.')) 
        {
             return true;
        }
        else
        {
            return false; 
        }
    }
    else
    {
        return true;
    }

       return false;
    }

 function formatDate(date) {
    var d = new Date(date),
        month = '' + (d.getMonth() + 1),
        day = '' + d.getDate(),
        year = d.getFullYear();

    if (month.length < 2) 
        month = '0' + month;
    if (day.length < 2) 
        day = '0' + day;

    return [year, month, day].join('-');
}


</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\abudhabi\resources\views/Setting/schedule/edit-voucher-valid-date.blade.php ENDPATH**/ ?>