I am trying to get the formatted date of an ACF date field into a javascript variable. I am using a front-end form. This is the code I have now but does not seem to work.
acf.add_filter('date_picker_args', function(args, field) {
console.log("test"); //this doesn't even show up in the console for some reason
args['onSelect'] = function(dateText, inst) {
console.log("dateText"); //nothing logged here either
}
return args;
});