Thank you. I allready solves it,but your code looks cleaner than mine.
I wqs trying to build a plugin that displays a calendar with cpt and acf custom date.
I got everithing working, so if anyone needs it,ask it here.
I will also upload it to wp repository,since i saw a lot of people wqs looking for something like that.