malzariey/filament-daterangepicker-filter

disabledDates doesn't disable given dates

mohssineAboutaj opened this issue · 4 comments

Description

The disabledDates prop is not working as expected. When passing a list of dates to disable, the dates are not being disabled in the date picker.

Steps to Reproduce

  1. Create a DateRangePicker instance with the disabledDates prop.
  2. Pass a list of dates to disable using the disabledDates prop.
  3. Observe that the disabled dates are not being disabled in the date picker.

Expected Behavior

The dates passed to the disabledDates prop should be disabled in the date picker, preventing the user from selecting them.

Actual Behavior

The dates passed to the disabledDates prop are not being disabled in the date picker, allowing the user to select them.

Code Example

DateRangePicker::make('start_date')
  ->disabledDates([\Carbon\Carbon::now()->addDays(3),])
  ->required(),

Environment

  • Package version: 1.3.2
  • Filament version: 2.0
  • Laravel version: 10.0
  • PHP version: 8.1

I will look into the issue. Thanks for reporting. But it will only be available with Filament 3.

unfortunately i was need it in v2
However i will upgrade to v3 soon but maybe someone who can't upgrade face this, i hope you will find a solution

Hi @malzariey any news on this one? :)

Thanks for providing this plugin btw!

EDIT:

I am using Filament V3 in a brand new project.

Sorry for the delayed response,

Now with v2.5 it is possible to disable dates only disallowing users to select them on the calendar,

An improved version will be implemented on a later date.

Thank you for raising the issue.