File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -77,15 +77,20 @@ Forms\Components\DatePicker::make('birthday')
77
77
```
78
78
79
79
## Configuring the Format Globally
80
- You can set the default date formats for tables and infolists anywhere you want, likely in a service provider:
80
+ You can set the default date formats for tables, infolists and date/time pickers anywhere you want, likely in a service provider:
81
81
82
82
``` php
83
83
public function boot(): void
84
84
{
85
85
Table::$defaultDateDisplayFormat = 'Y/m/d';
86
86
Table::$defaultDateTimeDisplayFormat = 'Y/m/d H:i:s';
87
+
87
88
Infolist::$defaultDateDisplayFormat = 'Y/m/d';
88
89
Infolist::$defaultDateTimeDisplayFormat = 'Y/m/d H:i:s';
90
+
91
+ DateTimePicker::$defaultDateDisplayFormat = 'Y/m/d';
92
+ DateTimePicker::$defaultDateTimeDisplayFormat = 'Y/m/d H:i';
93
+ DateTimePicker::$defaultDateTimeWithSecondsDisplayFormat = 'Y/m/d H:i:s';
89
94
}
90
95
```
91
96
You can’t perform that action at this time.
0 commit comments