Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何从ACF前端表单中的日期字段中获取格式化的日期值?_Javascript_Wordpress_Jquery Ui_Advanced Custom Fields_Jquery Ui Datepicker - Fatal编程技术网

Javascript 如何从ACF前端表单中的日期字段中获取格式化的日期值?

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日期字段的格式化日期输入到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'] = function(dateText, inst) {
                console.log("dateText"); //nothing logged here either
            }
            return args;
        });