Add datepicker to a list field

Continuing the discussion from Date Field in List:

I added this code but it did not work for me and I am not sure why?

add_action( 'wp_header', function () { ?>
// paste the JS code here (formId, fieldId, column)
	function listFieldDatepicker(41, 134, 4) {
    var listField = '#field_' + formId + '_' + fieldId,
        columnClass = '.gfield_list_' + fieldId + '_cell' + column + ' input';
        showOn: 'both',
		buttonImage: '/wp-content/plugins/gravityforms/images/calendar.png',
        buttonImageOnly: true,
        dateFormat: 'dd/mm/yy',
        firstDay: 1
<?php } );

Here is a brief video of what I did

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.