facetwp allowinput datepicker

<?php

/** add js to footer to modify date_range options **/
add_action( 'wp_footer', function() { ?>
    <script>
	(function($) {
		if ( 'undefined' !== typeof FWP ) {
			FWP.hooks.addFilter('facetwp/set_options/date_range', function(flatpickr_opts, extras) {
				flatpickr_opts['allowInput'] = true;
				return flatpickr_opts;
			});
		}
	})(jQuery);
    </script>
<?php }, 100 );