Skip to content

Commit

Permalink
Added new generic datepicker partial
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Jan 13, 2021
1 parent bbcd215 commit c00a1fa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions resources/views/partials/forms/edit/datepicker.blade.php
@@ -0,0 +1,12 @@
<!-- Datepicker -->
<div class="form-group{{ $errors->has($fieldname) ? ' has-error' : '' }}">
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
<div class="input-group col-md-3">
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="{{ $fieldname }}" id="{{ $fieldname }}" value="{{ old($fieldname, ($item->{$fieldname}) ? $item->{$fieldname}->format('Y-m-d') : '') }}">
<span class="input-group-addon"><i class="fa fa-calendar" aria-hidden="true"></i></span>
</div>
{!! $errors->first($fieldname, '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>

0 comments on commit c00a1fa

Please sign in to comment.