Hi mumbomedia,
Yes, you can do this with an addon. Here’s how I might go about it:
1. There’s a filter you can use to disable all frontend asset loading:
https://github.com/NateWr/restaurant-reservations/blob/master/restaurant-reservations.php#L56
This will prevent all the scripts from being registered here:
https://github.com/NateWr/restaurant-reservations/blob/master/restaurant-reservations.php#L256-L279
2. In your addon, I’d then register the reservations styles (if you want them).
3. The script booking-form.js
just won’t work with a different picker, so you’ll need to rebuild the functionality there in your own addon. Once you’ve done that, register that script and enqueue it. You’ll also need to pass the settings to your new script with wp_localize_script. Here’s how it’s done for the default script:
https://github.com/NateWr/restaurant-reservations/blob/master/includes/template-functions.php#L172-L184
One thing you’ll need to make sure of is that your datepicker submits the value in the correct format. It expects yyyy/mm/dd
in the Pickadate formats, which are documented here.
Probably the hardest thing you’ll run into is managing the scheduling rules. Transforming the rules from the settings into rules your datepicker understands can be tricky.
Good luck and let me know how you get on! If you don’t mind sharing the results in a gist or github repo that’d be great.