mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 22:19:41 -08:00
Merge pull request #11726 from inietov/fixes/customfields_date_format_issue
Fixed #11709 Dates in custom fields not always stored in the correct format
This commit is contained in:
commit
49d2aef831
|
@ -45,8 +45,8 @@
|
||||||
@if ($field->format=='DATE')
|
@if ($field->format=='DATE')
|
||||||
|
|
||||||
<div class="input-group col-md-4" style="padding-left: 0px;">
|
<div class="input-group col-md-4" style="padding-left: 0px;">
|
||||||
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">
|
<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="{{ $field->db_column_name() }}" id="{{ $field->db_column_name() }}" value="{{ old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : $field->defaultValue($model->id))) }}">
|
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="{{ $field->db_column_name() }}" id="{{ $field->db_column_name() }}" readonly value="{{ old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : $field->defaultValue($model->id))) }}">
|
||||||
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
|
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<label for="purchase_date" class="col-md-3 control-label">{{ trans('general.purchase_date') }}</label>
|
<label for="purchase_date" class="col-md-3 control-label">{{ trans('general.purchase_date') }}</label>
|
||||||
<div class="input-group col-md-4">
|
<div class="input-group col-md-4">
|
||||||
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">
|
<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="purchase_date" id="purchase_date" value="{{ old('purchase_date', ($item->purchase_date) ? $item->purchase_date->format('Y-m-d') : '') }}">
|
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" readonly value="{{ old('purchase_date', ($item->purchase_date) ? $item->purchase_date->format('Y-m-d') : '') }}">
|
||||||
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
|
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
|
||||||
</div>
|
</div>
|
||||||
{!! $errors->first('purchase_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
{!! $errors->first('purchase_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||||
|
|
Loading…
Reference in a new issue