mokhosh / filament-jalali

Add Jalali datetime to your filament apps
MIT License
29 stars 2 forks source link

[Bug]: Undefined variable $getLocale #14

Closed Mo0rteza closed 1 month ago

Mo0rteza commented 1 month ago

What happened?

I used the DatePicker in my project. DatePicker::make('date') ->native(false) ->closeOnDateSelection() ->weekStartsOnSunday() ->jalali(), the locale is set to fa and I want to use the Jalai date picker. but the error Undefined variable $getLocale occurs.

How to reproduce the bug

I installed mokhosh/filament-jalali package in my laravel project. I used the DatePicker in form function as mentioned in the document like the following:

use Filament\Forms\Components\DatePicker; DatePicker::make('date') ->native(false) ->closeOnDateSelection() ->weekStartsOnSunday() ->jalali(), but the the error occurred. note: It works properly in the table function. the following line of code works. TextColumn::make('date')->sortable()->jalaliDate(),

1

Package Version

3.5.0

PHP Version

8.2

Laravel Version

11.9

Which operating systems does with happen with?

Windows

Notes

No response

mokhosh commented 1 month ago

Check this https://github.com/mokhosh/filament-jalali/issues/12 and this https://github.com/mokhosh/filament-jalali/issues/13

Mo0rteza commented 1 month ago

as I read the filament source code, this problem was solved in the filament version: 3.2.110. getLocale() added to DateTimePicker form Component. but my filament version was: 3.2 I updated my composer with composer update.