Programmatically select a service to update and enable the calendar
Hi,
I see that upon manually selecting a service (single location, single worker scenario), there are two ajax calls, the calendar is refreshed and becomes enabled.
In my use case, the user doesn't select the service through the drop down, but another UI (separate buttons) on the same page. Is there a way to simulate choosing an option in the dropdown when the other UI button is clicked? Sorry, I'm a javascript newbie.
The alternative would be to replicate the ajax calls the dropdown selection would've made, nonce and all? Thanks.
2 Answers
Best Answer
Answering my own question if it can help anyone else:
jQuery('select[name ="service"]').val(X).change()
where X is the option index in the dropdown.
Please login or Register to submit your answer