DateTimePicker time selection jumping back to 0

Hello, yesterday i was worked with the DateTimePicker and i tried to use the minDate/maxDate on the non-native component, but after I added that function I observed that when I trying to change the time it always jump back to 0 and if i remove that function the time picker works correctly. Is this some kind of bug or the minDate/maxDate not working with the non-native DateTimePicker?
8 Replies
wazkaz
wazkaz3w ago
And also this is the component how I am using: DateTimePicker::make('start_date') ->label(__('Start date')) ->default(now()->startOfDay()) ->seconds(false) ->weekStartsOnMonday() ->required() ->maxDate(function (Get $get) { return $get('end_date'); }) ->closeOnDateSelection() ->native(false) ->displayFormat(config('localization.date_time_format')) ->live(),
Vp
Vp3w ago
Maybe because of ->live(), without live() any differences? or try ->live(onBlur: true)
wazkaz
wazkaz3w ago
Without live() do the same and with live(onBlur: true) no differences
Vp
Vp3w ago
I just copy/paste your code, I didn't change any but I don't have your problem..
JJSanders
JJSanders3w ago
Maybe browser issue?
wazkaz
wazkaz3w ago
I forgot to mention that this problem only occurs when you are on the edit record page. On the create page works good. Can you try on the edit record page?
Vp
Vp3w ago
No problem as well.. What is your filament version?
wazkaz
wazkaz3w ago
Strange 3.2.88