Closed atenadadkhah closed 1 month ago
Hello,
There's no need to update the config. It's better if you set minDate
to 'attr'
right from the start in this example. For sample:
jalaliDatepicker.startWatch({
zIndex: 20,
minDate: 'attr'
});
JalaliDatepicker will detect any input with data-jdp
attribute, so there's no need to call updateOptions
and startWatch
again.
Another thing to ensure is that the value of the data-jdp-min-date
attribute is correctly set and follows the proper pattern. For example:
data-jdp-min-date="1403/05/09" // Correct
data-jdp-min-date="1403/5/9" // Incorrect
Livewire 3 has introduced a new feature called
wire:navigate
that you can add it to<a>
tags and then after clicking on that link, page wont reload and it will navigate to the next URL. Just like SPA frameworks. https://livewire.laravel.com/docs/navigateBut when I use JalaliDatePicker with
wire:navigate
feature of livewire, every time I navigate to the page I've used JalaliDatePicker in, and click on the datepicker input, it doesn't open. But as soon as I reload the page everything will be fine, as a result I found out that the problem is with navigating through the pages and not reloading them because ofwire:navigate
.But livewire has introduced a solution for this here https://livewire.laravel.com/docs/navigate#dont-rely-on-domcontentloaded and it works for any other JS library except this library which is so vital for my application.
Here is my code in a Laravel blade component:
And this is that
input-group
Laravel component which I've used in the above code:And this is my
app.js
which I've imported this library in:Can you please check the problem?
Thank you in advance.