skip to Main Content

Package Version
v3.0.0

DatePicker::make('reservation_date')
->label('Rezervasyon Tarihi')
->live(onBlur: true)

I went to DatePicker component inside and add:
public static string $defaultDateDisplayFormat = "d/m/Y";

However its still showing as "mm/dd/YYYY" on input before selection and after.

Is there a solution for me to show it as "dd/mm/YYYY" .

I need help <3

I expect to see 23/02/2024 however it still shows me 02/23/2024.

2

Answers


  1. You can simply use the format method.

    DatePicker::make('reservation_date')
               ->label('Rezervasyon Tarihi')
               ->live(onBlur: true)
               ->format('d/m/Y')
    

    Docs

    Login or Signup to reply.
  2. hi,
    Just add displayFormat method

    DatePicker::make('reservation_date')
               ->label('Rezervasyon Tarihi')
               ->live(onBlur: true)
               ->displayFormat('d/m/Y')
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search