-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flatpicker and bootstrap date picker requires full page refresh to show. #3084
Comments
Could you share the initialization you have currently setup that is working in 1.9.11 (and not in 2.x) that will initialize these inputs after they are swapped in? It may be that the behavior around the swap you are targeting has changed slightly. |
The only thing I can see in https://htmx.org/migration-guide-htmx-1/ that could cause an issue is if you have something like hx-on= solving the date picker issue in v1 which needs updating to the new hx-on format. Also check any htmx extensions are upgraded as head-support extension could be in use to load the date picker's javascript dependency from the partial response. |
If you can observe this video to understand the context of the behaviour am
describing it would help.This is the version that works with htmx 1
…On Thu, Dec 19, 2024 at 2:53 AM MichaelWest22 ***@***.***> wrote:
The only thing I can see in https://htmx.org/migration-guide-htmx-1/ that
could cause an issue is if you have something like hx-on= solving the date
picker issue in v1 which needs updating to the new hx-on format. Also check
any htmx extensions are upgraded as head-support extension could be in use
to load the date picker's javascript dependency from the partial response.
—
Reply to this email directly, view it on GitHub
<#3084 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOTDQAI7CHB24QQ2KH4FKM32GIDGNAVCNFSM6AAAAABTZGKRGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNJSGQ4DMNBUHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
htmx.onLoad(function(elt){
flatpickr("#id_lending_date", {
enableTime: true,
dateFormat: "Y-m-d H:i",
});
})
On Thu, Dec 19, 2024 at 9:48 PM Coding Simplified. <
***@***.***> wrote:
… If you can observe this video to understand the context of the behaviour
am describing it would help.This is the version that works with htmx 1
On Thu, Dec 19, 2024 at 2:53 AM MichaelWest22 ***@***.***>
wrote:
> The only thing I can see in https://htmx.org/migration-guide-htmx-1/
> that could cause an issue is if you have something like hx-on= solving the
> date picker issue in v1 which needs updating to the new hx-on format. Also
> check any htmx extensions are upgraded as head-support extension could be
> in use to load the date picker's javascript dependency from the partial
> response.
>
> —
> Reply to this email directly, view it on GitHub
> <#3084 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AOTDQAI7CHB24QQ2KH4FKM32GIDGNAVCNFSM6AAAAABTZGKRGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNJSGQ4DMNBUHA>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
The above code is working with htmx 2
On Thu, Dec 19, 2024 at 10:06 PM Coding Simplified. <
***@***.***> wrote:
… htmx.onLoad(function(elt){
flatpickr("#id_lending_date", {
enableTime: true,
dateFormat: "Y-m-d H:i",
});
})
On Thu, Dec 19, 2024 at 9:48 PM Coding Simplified. <
***@***.***> wrote:
> If you can observe this video to understand the context of the behaviour
> am describing it would help.This is the version that works with htmx 1
>
> On Thu, Dec 19, 2024 at 2:53 AM MichaelWest22 ***@***.***>
> wrote:
>
>> The only thing I can see in https://htmx.org/migration-guide-htmx-1/
>> that could cause an issue is if you have something like hx-on= solving the
>> date picker issue in v1 which needs updating to the new hx-on format. Also
>> check any htmx extensions are upgraded as head-support extension could be
>> in use to load the date picker's javascript dependency from the partial
>> response.
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <#3084 (comment)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/AOTDQAI7CHB24QQ2KH4FKM32GIDGNAVCNFSM6AAAAABTZGKRGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNJSGQ4DMNBUHA>
>> .
>> You are receiving this because you authored the thread.Message ID:
>> ***@***.***>
>>
>
|
But it got lots of errors
On Thu, 19 Dec 2024, 22:07 Coding Simplified., <
***@***.***> wrote:
… The above code is working with htmx 2
On Thu, Dec 19, 2024 at 10:06 PM Coding Simplified. <
***@***.***> wrote:
> htmx.onLoad(function(elt){
> flatpickr("#id_lending_date", {
> enableTime: true,
> dateFormat: "Y-m-d H:i",
> });
> })
>
>
> On Thu, Dec 19, 2024 at 9:48 PM Coding Simplified. <
> ***@***.***> wrote:
>
>> If you can observe this video to understand the context of the behaviour
>> am describing it would help.This is the version that works with htmx 1
>>
>> On Thu, Dec 19, 2024 at 2:53 AM MichaelWest22 ***@***.***>
>> wrote:
>>
>>> The only thing I can see in https://htmx.org/migration-guide-htmx-1/
>>> that could cause an issue is if you have something like hx-on= solving the
>>> date picker issue in v1 which needs updating to the new hx-on format. Also
>>> check any htmx extensions are upgraded as head-support extension could be
>>> in use to load the date picker's javascript dependency from the partial
>>> response.
>>>
>>> —
>>> Reply to this email directly, view it on GitHub
>>> <#3084 (comment)>,
>>> or unsubscribe
>>> <https://github.com/notifications/unsubscribe-auth/AOTDQAI7CHB24QQ2KH4FKM32GIDGNAVCNFSM6AAAAABTZGKRGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNJSGQ4DMNBUHA>
>>> .
>>> You are receiving this because you authored the thread.Message ID:
>>> ***@***.***>
>>>
>>
|
htmx.onLoad(function(newContent){
$("#id_lending_date").flatpickr();
});
this code finally solved it.
On Thu, Dec 19, 2024 at 11:01 PM Coding Simplified. <
***@***.***> wrote:
… But it got lots of errors
On Thu, 19 Dec 2024, 22:07 Coding Simplified., <
***@***.***> wrote:
> The above code is working with htmx 2
>
> On Thu, Dec 19, 2024 at 10:06 PM Coding Simplified. <
> ***@***.***> wrote:
>
>> htmx.onLoad(function(elt){
>> flatpickr("#id_lending_date", {
>> enableTime: true,
>> dateFormat: "Y-m-d H:i",
>> });
>> })
>>
>>
>> On Thu, Dec 19, 2024 at 9:48 PM Coding Simplified. <
>> ***@***.***> wrote:
>>
>>> If you can observe this video to understand the context of the
>>> behaviour am describing it would help.This is the version that works with
>>> htmx 1
>>>
>>> On Thu, Dec 19, 2024 at 2:53 AM MichaelWest22 ***@***.***>
>>> wrote:
>>>
>>>> The only thing I can see in https://htmx.org/migration-guide-htmx-1/
>>>> that could cause an issue is if you have something like hx-on= solving the
>>>> date picker issue in v1 which needs updating to the new hx-on format. Also
>>>> check any htmx extensions are upgraded as head-support extension could be
>>>> in use to load the date picker's javascript dependency from the partial
>>>> response.
>>>>
>>>> —
>>>> Reply to this email directly, view it on GitHub
>>>> <#3084 (comment)>,
>>>> or unsubscribe
>>>> <https://github.com/notifications/unsubscribe-auth/AOTDQAI7CHB24QQ2KH4FKM32GIDGNAVCNFSM6AAAAABTZGKRGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNJSGQ4DMNBUHA>
>>>> .
>>>> You are receiving this because you authored the thread.Message ID:
>>>> ***@***.***>
>>>>
>>>
|
When I load a Django form though as html partial the ie hx-get , date picker pops correctly in version 1.9.11 and below.Upgraded htmx 2 does not load the date picker until I refresh the full page.
The text was updated successfully, but these errors were encountered: