|
@@ -96,8 +96,8 @@ class EstimateResource extends Resource
|
96
|
96
|
->timezone(CompanySettingsService::getDefaultTimezone())
|
97
|
97
|
->columnSpan(2)
|
98
|
98
|
->afterStateUpdated(function (Forms\Set $set, Forms\Get $get, $state) {
|
99
|
|
- $date = $state;
|
100
|
|
- $expirationDate = $get('expiration_date');
|
|
99
|
+ $date = Carbon::parse($state)->toDateString();
|
|
100
|
+ $expirationDate = Carbon::parse($get('expiration_date'))->toDateString();
|
101
|
101
|
|
102
|
102
|
if ($date && $expirationDate && $date > $expirationDate) {
|
103
|
103
|
$set('expiration_date', $date);
|
|
@@ -143,7 +143,7 @@ class EstimateResource extends Resource
|
143
|
143
|
})
|
144
|
144
|
->timezone(CompanySettingsService::getDefaultTimezone())
|
145
|
145
|
->minDate(static function (Forms\Get $get) {
|
146
|
|
- return $get('date') ?? now();
|
|
146
|
+ return Carbon::parse($get('date'))->toDateString() ?? now(CompanySettingsService::getDefaultTimezone())->toDateString();
|
147
|
147
|
})
|
148
|
148
|
->live()
|
149
|
149
|
->afterStateUpdated(function (Forms\Set $set, Forms\Get $get, $state) {
|