Javascript 如何从ACF前端表单中的日期字段中获取格式化的日期值?
我试图将ACF日期字段的格式化日期输入到javascript变量中。我使用的是前端表单。这是我现在拥有的代码,但似乎不起作用Javascript 如何从ACF前端表单中的日期字段中获取格式化的日期值?,javascript,wordpress,jquery-ui,advanced-custom-fields,jquery-ui-datepicker,Javascript,Wordpress,Jquery Ui,Advanced Custom Fields,Jquery Ui Datepicker,我试图将ACF日期字段的格式化日期输入到javascript变量中。我使用的是前端表单。这是我现在拥有的代码,但似乎不起作用 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
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;
});