Hi,
For a range, you can use the JS options minDate
and maxDate
. Example
[
'name' => __( 'Date', 'your-text-domain' ),
'id' => $prefix . 'date_xabk9calx28',
'type' => 'date',
'js_options' => [
'minDate' => -5,
'maxDate' => '+5D',
],
],
For some specific dates, Meta Box does not support doing that. You can follow this article to do by using the code https://codehasbug.com/javascript/disable-specific-date-in-jquery-datepicker/