Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Bromira's avatar

Livewire to JS Array - Databinding

I'm using flatpickr date range picker storing the start/end dates within an array like so:

value: ['2022/01/01', '2022/01/10'],

The value(s) are stored within 1 input box and split like so in the preview:

2022/01/01 to 2022/01/10

with a simple string split function on " to ".

My question is, how would I databind the start/end elements within the JS array?

Thanks!

0 likes
0 replies

Please or to participate in this conversation.