Support

Account

Home Forums Backend Issues (wp-admin) How to get formatted date value from date field in an ACF front-end form?

Unread

How to get formatted date value from date field in an ACF front-end form?

  • 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;
    		});
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.