Home › Forums › Backend Issues (wp-admin) › Date Picker – Prefilled To Today › Reply To: Date Picker – Prefilled To Today
Edd is correct, there are filters. You could use load value or you can set the default value using load_field. Here is some example code
add_filter('acf/load_field/name=YOUR_FILED_NAME', 'my_acf_default_date');
function my_acf_default_date($field) {
$field['default_value'] = date('Ymd');
return $field;
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.