git commit "fix: persianDatepicker did not initialize due to jQuery loading after content
This commit is contained in:
@@ -111,15 +111,20 @@
|
||||
</label>
|
||||
|
||||
<input type="text"
|
||||
id="start_date"
|
||||
name="start_date"
|
||||
id="departure_date"
|
||||
name="departure_date"
|
||||
class="form-control"
|
||||
placeholder="انتخاب تاریخ حرکت">
|
||||
{{ verta($tour->departure_date)->format('Y/m/d') }}
|
||||
readonly
|
||||
autocomplete="off"
|
||||
value="{{ old('departure_date', $tour->departure_date ? verta($tour->departure_date)->format('Y/m/d') : '') }}">
|
||||
|
||||
@error('departure_date')
|
||||
<div class="text-danger mt-2">{{ $message }}</div>
|
||||
@enderror
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4 mb-3">
|
||||
|
||||
<label>وضعیت</label>
|
||||
@@ -192,17 +197,15 @@
|
||||
|
||||
<script>
|
||||
|
||||
$("#start_date").persianDatepicker({
|
||||
|
||||
format: 'YYYY/MM/DD',
|
||||
|
||||
autoClose: true,
|
||||
|
||||
initialValue: false,
|
||||
|
||||
minDate: new persianDate()
|
||||
|
||||
window.addEventListener('load', function () {
|
||||
$("#departure_date").persianDatepicker({
|
||||
format: 'YYYY/MM/DD',
|
||||
autoClose: true,
|
||||
initialValue: false,
|
||||
minDate: new persianDate()
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user