malzariey / filament-daterangepicker-filter

MIT License
97 stars 43 forks source link

disabledDates doesn't disable given dates #32

Closed mohssineAboutaj closed 5 months ago

mohssineAboutaj commented 1 year ago

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

malzariey commented 1 year ago

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

mohssineAboutaj commented 1 year ago

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

Reached commented 1 year ago

Hi @malzariey any news on this one? :)

Thanks for providing this plugin btw!

EDIT:

I am using Filament V3 in a brand new project.

malzariey commented 5 months ago

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.