I'm making a form with a datepicker. The action of the form is the url of a booking web site, so I need the arrival date. But, I need to explode/split the date before submitting the form.
However, i'm using Visual Composer. So i can't add PHP in my code and I can't add event on my HTML (when I add onclick='submitForm()'
for example, I save but it disappeared).
So I thought to make a function in JS to split the date but as I can't add event on my HTML, it's not working...
So I want to know how do I add event in my HTML and how to get my $_GET['beginDate']
that I want to explode to my JS code
(to have
var myDate = $_GET['beginDate'];
var tabDate = myDate.split("-");
)
I'm stuck here... It's for the reservit API.
Thanks for your help !