Two pages on the frontend that use a date picker.
Both date pickers are exactly the same.
On the first page, the mb_user_profile_info
shortcode is used, and the datepicker is localized.
On the second page, the mb_frontend_form
shortcode is used, but the datepicker is not being localized.
The wp_localize_jquery_ui_datepicker()
function is being called, however, this is not having an effect. A workaround was found by manually loading in the jQuery.datepicker.setDefaults on the CPT's that use mb_frontend_form
, but this is something that might need to be looked into further.
It could be something else causing the datepicker settings not to load--it's a complex setup. Since 2 hours have been spent in troubleshooting, this ticket was opened in case others are having the same issue.