Hey, I have been looking everywhere but couldn’t find an answer to my question.
I am adding a date picker to my Bricks form and I would like that only Thursdays and Saturdays are possible to select.
I have found the example in the Bricks Academy, as well as the option to disable dates by function on Flatpickr, but I don’t know how to merge both codes… I am not a dev.
At the moment I added a php snippet to have Monday as first day of the week and hide the past dates, which works, but I can’t figure out how to disable all days except Thursdays and Saturdays…
Here is my current snippet:
add_filter( 'bricks/element/form/datepicker_options', function( $options, $element ) {
$options['locale'] = [
'firstDayOfWeek' => 1 // Set Monday as the first week day
];
$options['minDate'] = 'today'; // Disable all past dates
return $options;
}, 10, 2 );
Where can I add the code to diable the days? Thank you!