git commit "fix: persianDatepicker did not initialize due to jQuery loading after content
This commit is contained in:
@@ -164,10 +164,14 @@
|
||||
تاریخ حرکت پرواز
|
||||
</label>
|
||||
|
||||
|
||||
<input type="text"
|
||||
id="departure_date"
|
||||
name="departure_date"
|
||||
class="form-control"
|
||||
readonly
|
||||
autocomplete="off"
|
||||
value="{{ old('departure_date') }}"
|
||||
placeholder="انتخاب تاریخ حرکت">
|
||||
|
||||
@error('departure_date')
|
||||
@@ -177,8 +181,6 @@
|
||||
@enderror
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4 mb-3">
|
||||
|
||||
<label>
|
||||
@@ -291,11 +293,13 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$("#departure_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