sebastienheyd/boilerplate

How to set min and max date using Carbon on datetimepicker?

cod3rshotout opened this issue · 1 comments

I cannot find any example in the documentation, I want set minDate and maxDate using carbon:

https://getdatepicker.com/5-4/Options/#mindate

You have to use a non-primitive value by using :options, it's not convenient but it works :

<x-boilerplate::datetimepicker name="test" :options="'minDate:\''.\Illuminate\Support\Carbon::now()->format('Y-m-d').'\''" />