git commit "fix: persianDatepicker did not initialize due to jQuery loading after content
This commit is contained in:
@@ -154,12 +154,13 @@
|
||||
id="departure_date"
|
||||
name="departure_date"
|
||||
class="form-control"
|
||||
readonly
|
||||
autocomplete="off"
|
||||
value="{{ old('departure_date') }}"
|
||||
placeholder="انتخاب تاریخ حرکت">
|
||||
|
||||
@error('departure_date')
|
||||
<div class="text-danger mt-2">
|
||||
{{ $message }}
|
||||
</div>
|
||||
<div class="text-danger mt-2">{{ $message }}</div>
|
||||
@enderror
|
||||
|
||||
</div>
|
||||
@@ -230,16 +231,13 @@
|
||||
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user