Forums

Dynamic Dropdown based on datepicker

Goyens 17 Dec, 2014
Hello guys,

When I change a date, I would like a dropdown to be updated (DB read) based on the date selected.
I understand the double dynamic dropdown using ajax but there is no event tabs calling the ajax function in the datepicker...
How can I do ?

Thank you in advance ! 😉
GreyHead 17 Dec, 2014
Hi Goyens,

You can do this with some Custom JavaScript triggered when the date input changes. The script would need to make an Ajax call back ot the server to get the data you need and then update the drop-down options. The code would be similar to that created for the double drop-down but linked to the onChange event of the data input.

Bob
Goyens 17 Dec, 2014
Hi Greyhead,

Thanks for your reply. I guess that I am too beginner to follow you.
Do you have a template of the code I should write in the javascript ?



For your information, I have made an ajax event called "availability" for a double dropdown that is working.
Any way to call this ajax event from the javascript ?

Thank you so much.

Screenshots for referral :



This topic is locked and no more replies can be posted.