Skip to content

Commit 6f9215c

Browse files
committed
add datetime picker format customization to readme
1 parent 50de7db commit 6f9215c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,20 @@ Forms\Components\DatePicker::make('birthday')
7777
```
7878

7979
## 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:
8181

8282
```php
8383
public function boot(): void
8484
{
8585
Table::$defaultDateDisplayFormat = 'Y/m/d';
8686
Table::$defaultDateTimeDisplayFormat = 'Y/m/d H:i:s';
87+
8788
Infolist::$defaultDateDisplayFormat = 'Y/m/d';
8889
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';
8994
}
9095
```
9196

0 commit comments

Comments
 (0)