<form class="row g-3 auto-width note" action="{{ route('nurse-notes.update', $type->id)}}" method="post" enctype='multipart/form-data' >
    @csrf
    @method('patch')

    <div class="col-md-6">
        <label for=" Date " class="form-label"> Date<span class="text-danger"><b>*</b></span></label>
        <input class="form-control datepicker" type="text" value="{!! isset($type->date) && $type->date != '' ? formatedDate($type->date) : '' !!}" id="date" name="date" autocomplete="off">
        <span class="text-danger error_date" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-12">
        <label for="note" class="form-label">Note <span class="text-danger"><b>*</b></span></label>
        <textarea class="form-control" id="note" name="note" aria-describedby="inputGroupPrepend" required value="" >{{$type->note}}</textarea>
        <span class="text-danger error_note" style="display:none;">This field is required.</span>
    </div>

    <div class="col-md-12">
        <label for="comment" class="form-label">Comment <span class="text-danger"><b>*</b></span></label>
        <textarea class="form-control" id="comment" name="comment" aria-describedby="inputGroupPrepend" required value="">{{$type->comment}}</textarea>
        <span class="text-danger error_comment" style="display:none;">This field is required.</span>
    </div>
  
</form>
<script >
     $(function () {
        $('#date').datepicker({
            dateFormat: 'dd-mm-yy'
        })
        .on('changeDate', function (ev) {
             $(this).datepicker('hide');
        })

    });
</script>