How to disable datepicker dates via function?

Hello. I understand that sw-datepicker uses flatpickr and according to flatpickr, dates can be disables via functions. I want to do the same thing but sw-datepicker uses objects to take custom configurations in twig file. An example is the one below

How can I use a function within this twig to disable dates (for example to disable certain days of week etc), as shown in the flatpickr documentation: