Repository navigation
Expand file tree
/
Copy pathDateTimePicker.php
More file actions
790 lines (658 loc) · 25.6 KB
/
Copy pathDateTimePicker.php
File metadata and controls
790 lines (658 loc) · 25.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
<?php
declare(strict_types=1);
namespace NyonCode\WireForms\Components;
use Carbon\Carbon;
use Closure;
use DateTimeInterface;
use Illuminate\Database\Eloquent\Model;
use NyonCode\WireCore\Foundation\Concerns\CanBeTyped;
use NyonCode\WireCore\Foundation\Concerns\HasExtraInputAttributes;
use NyonCode\WireCore\Foundation\Concerns\HasNativeControl;
use NyonCode\WireCore\Foundation\Concerns\HasSheetOnMobile;
use NyonCode\WireCore\Foundation\Contracts\DehydratesState;
use NyonCode\WireCore\Foundation\Contracts\HydratesState;
use NyonCode\WireCore\Foundation\Support\DateBoundary;
use NyonCode\WireForms\Contracts\ProvidesImplicitValidationRules;
use NyonCode\WireForms\Validation\Rules\DateWithinBounds;
/**
* Unified date/time picker field.
*
* Replaces the three original classes (DatePicker, TimePicker, DateTimePicker)
* with a single class using ->mode('date'|'time'|'datetime').
*
* @see ADR 0008
*/
class DateTimePicker extends Field implements DehydratesState, HydratesState, ProvidesImplicitValidationRules
{
use CanBeTyped;
use HasExtraInputAttributes;
use HasNativeControl {
HasNativeControl::isNative as protected nativeChoice;
}
use HasSheetOnMobile;
protected string $mode = 'datetime';
protected ?string $format = null;
protected ?string $displayFormat = null;
protected string|DateTimeInterface|Closure|null $minDate = null;
protected string|DateTimeInterface|Closure|null $maxDate = null;
protected ?int $firstDayOfWeek = null;
/** @var array<int, string>|Closure */
protected array|Closure $disabledDates = [];
protected bool $closeOnDateSelection = false;
protected bool $withSeconds = false;
protected ?int $hoursStep = null;
protected ?int $minutesStep = null;
protected ?int $secondsStep = null;
protected ?string $timezone = null;
protected string|Closure|null $minTime = null;
protected string|Closure|null $maxTime = null;
protected bool $belowBreakpointOnly = false;
// ─── Mode ──────────────────────────────────────────────────────
/** Set the picker mode directly (date, time, or datetime). */
public function mode(string $mode): static
{
$this->mode = $mode;
return $this;
}
/** Pick a date only. */
public function asDate(): static
{
return $this->mode('date');
}
/**
* Month + year picking ("YYYY-MM"). Always renders as a native
* <input type="month"> — the custom calendar has no month-only grid.
*/
public function asMonth(): static
{
return $this->mode('month');
}
/** Pick a time only. */
public function asTime(): static
{
return $this->mode('time');
}
/** Pick both date and time. */
public function asDateTime(): static
{
return $this->mode('datetime');
}
// ─── Format ────────────────────────────────────────────────────
/**
* The format the value is stored in. Without one the widget's own state
* shape is stored as it is — see {@see dehydrateState()}.
*/
public function format(?string $format): static
{
$this->format = $format;
return $this;
}
/**
* How the picked value is shown to the user, in PHP date() tokens
* (`d.m.Y`, `j. n. Y H:i`, …). The stored value is unaffected. Without
* one, `wire-forms.date_format`, `time_format` or `datetime_format` is the
* default for the mode.
*
* Honoured by the custom picker only: a native input's display format is
* the browser's business, driven by the user's locale.
*/
public function displayFormat(?string $format): static
{
$this->displayFormat = $format;
return $this;
}
// ─── Constraints ───────────────────────────────────────────────
/**
* Set the earliest selectable date.
*
* Takes anything readable as a date — a Carbon/DateTimeInterface, or a
* string such as '2026-07-10', '10.07.2026', 'today' or '+1 week'. On a
* datetime picker a bound may carry a time ('2026-07-10 08:30'), which then
* limits the clock on that day too.
*/
public function minDate(string|DateTimeInterface|Closure|null $date): static
{
$this->minDate = $date;
return $this;
}
/**
* Set the latest selectable date.
*
* A day-granular bound covers the whole day: on a datetime picker
* `maxDate('2026-07-20')` leaves 20 July selectable up to 23:59.
*/
public function maxDate(string|DateTimeInterface|Closure|null $date): static
{
$this->maxDate = $date;
return $this;
}
/**
* The earliest time of day selectable on every day — opening hours.
*
* Unlike a time carried by `minDate('2026-07-10 08:30')`, which binds only
* on that one day, this window holds on each day of a datetime picker:
* `minTime('06:00')->maxTime('18:00')` leaves 06:00–18:00 pickable from
* Monday to Sunday. On a time picker the two read alike, and the stricter
* one wins. Takes `H:i` or `H:i:s`, or a `$get`-aware Closure.
*/
public function minTime(string|Closure|null $time): static
{
$this->minTime = $time;
return $this;
}
/** The latest time of day selectable on every day — see {@see minTime()}. */
public function maxTime(string|Closure|null $time): static
{
$this->maxTime = $time;
return $this;
}
/**
* Mark this picker as the phone's only: from the mobile breakpoint up it is
* display:none and another control stands in for it — a DateRangePicker's
* own. A hidden control must not carry `required`, or the browser refuses
* to submit a form it cannot point the user to; it says `aria-required`.
*
* @internal
*
* @docs-ignore Plumbing, not configuration: DateRangePicker sets it on the
* two ends it composes.
*/
public function belowBreakpointOnly(bool $condition = true): static
{
$this->belowBreakpointOnly = $condition;
return $this;
}
public function isBelowBreakpointOnly(): bool
{
return $this->belowBreakpointOnly;
}
/** Set the first day of the week in the calendar (0 = Sunday). */
public function firstDayOfWeek(?int $day): static
{
$this->firstDayOfWeek = $day;
return $this;
}
/**
* Mark specific dates as non-selectable.
*
* @param array<int, string>|Closure $dates
*/
public function disabledDates(array|Closure $dates): static
{
$this->disabledDates = $dates;
return $this;
}
/** Close the picker as soon as a date is chosen. */
public function closeOnDateSelection(bool $condition = true): static
{
$this->closeOnDateSelection = $condition;
return $this;
}
// ─── Time settings ─────────────────────────────────────────────
/** Include seconds in the time picker. */
public function withSeconds(bool $condition = true): static
{
$this->withSeconds = $condition;
return $this;
}
/** Set the hour increment step. */
public function hoursStep(?int $step): static
{
$this->hoursStep = $step;
return $this;
}
/** Set the minute increment step. */
public function minutesStep(?int $step): static
{
$this->minutesStep = $step;
return $this;
}
/** Set the second increment step. */
public function secondsStep(?int $step): static
{
$this->secondsStep = $step;
return $this;
}
/** Set the timezone used to interpret and display the value. */
public function timezone(?string $timezone): static
{
$this->timezone = $timezone;
return $this;
}
// ─── Getters ───────────────────────────────────────────────────
public function getMode(): string
{
return $this->mode;
}
/**
* The format the value is stored in: `format()` when set, else the state's
* own shape — exactly what {@see dehydrateState()} writes.
*/
public function getFormat(): string
{
return $this->format ?? $this->getStateFormat();
}
/**
* How the picked value is shown: `displayFormat()` when set, else the
* configured format for the mode, else null — the state itself.
*/
public function getDisplayFormat(): ?string
{
return $this->displayFormat ?? $this->configuredDisplayFormat();
}
/**
* `wire-forms.date_format` / `time_format` / `datetime_format` for this mode.
*
* Month has no key, and a field that keeps seconds is shown as its state
* when the configured format has no seconds of its own: a box reading
* `14:30` over `14:30:15` would store `14:30:00` the moment it is retyped.
*/
private function configuredDisplayFormat(): ?string
{
$key = match ($this->mode) {
'date' => 'date_format',
'time' => 'time_format',
'datetime' => 'datetime_format',
default => null,
};
if ($key === null) {
return null;
}
try {
$format = config('wire-forms.'.$key);
} catch (\Throwable) {
// Standalone use, with no container to read config from — the same
// case the modals guard. The state is then shown as it is.
return null;
}
if (! is_string($format) || $format === '') {
return null;
}
if ($this->hasSeconds() && ! self::formatCarriesSeconds($format)) {
return null;
}
return $format;
}
/** Whether a date() format has an unescaped `s` token. */
private static function formatCarriesSeconds(string $format): bool
{
for ($i = 0, $length = strlen($format); $i < $length; $i++) {
if ($format[$i] === '\\') {
$i++;
continue;
}
if ($format[$i] === 's') {
return true;
}
}
return false;
}
/**
* Whether the trigger really accepts typing right now.
*
* `typeable()` is the owner's choice, but `readOnly()` and `disabled()`
* outrank it — both mean "this value is not yours to change", and a keyboard
* is a way to change it. Resolved here because both picker views need the
* same answer, and a predicate re-spelled in two Blade files is one that
* ends up disagreeing with itself.
*
* Custom picker only. A native control's keyboard belongs to the browser;
* the only way to take it away is `readonly`, which would disable the
* browser's own picker along with it.
*/
public function acceptsTypedInput(): bool
{
return $this->isTypeable() && ! $this->isReadOnly() && ! $this->isDisabled();
}
/**
* The format a typed value is read back through.
*
* The trigger shows `displayFormat()` when there is one and the raw state
* otherwise, so the parser has to invert whichever of the two the user is
* looking at. Resolved here rather than rebuilt in JS: the mode already
* decides the state's shape, and only one of the two places should know it.
*/
public function getTypedFormat(): string
{
return $this->getDisplayFormat() ?? $this->getStateFormat();
}
/**
* The lower bound in the widget's own format — the only shape a native
* input honours and the custom picker can compare against.
*/
public function getMinDate(): ?string
{
return DateBoundary::min($this->evaluate($this->minDate), $this->getStateFormat());
}
public function getMaxDate(): ?string
{
return DateBoundary::max($this->evaluate($this->maxDate), $this->getStateFormat());
}
/**
* The daily window's lower edge as `H:i:s`, or null. Only a picker with a
* clock has one: a date or a month has no time of day to hold.
*/
public function getMinTime(): ?string
{
return $this->hasClock() ? DateBoundary::timeOfDay($this->evaluate($this->minTime)) : null;
}
public function getMaxTime(): ?string
{
return $this->hasClock() ? DateBoundary::timeOfDay($this->evaluate($this->maxTime)) : null;
}
/**
* The time-of-day bounds the clock draws on `$day`: the daily window, and
* on the first or last allowed day the time a `minDate()` / `maxDate()`
* carries — whichever is stricter. A time picker has no day, so both
* always apply there.
*
* @return array{0: ?string, 1: ?string}
*/
public function getTimeBoundsFor(?string $day = null): array
{
$min = $this->getMinDate();
$max = $this->getMaxDate();
$onMinDay = $this->mode === 'time' || ($day !== null && $day === DateBoundary::datePart($min));
$onMaxDay = $this->mode === 'time' || ($day !== null && $day === DateBoundary::datePart($max));
$lower = array_filter([$this->getMinTime(), $onMinDay ? DateBoundary::timePart($min) : null]);
$upper = array_filter([$this->getMaxTime(), $onMaxDay ? DateBoundary::timePart($max) : null]);
return [$lower === [] ? null : max($lower), $upper === [] ? null : min($upper)];
}
/**
* Month mode has no custom picker — the browser's <input type="month"> is the
* only UI there — so it forces the native control even over ->native(false).
*/
public function isNative(): bool
{
return $this->nativeChoice() || $this->mode === 'month';
}
/**
* The picker's bounds, repeated on the server — see {@see DateWithinBounds}.
* Nothing to hold, no rule: a plain date field keeps exactly the rules its
* owner wrote.
*
* @return array<int, mixed>
*/
public function implicitValidationRules(): array
{
$min = $this->getMinDate();
$max = $this->getMaxDate();
$disabled = $this->mode === 'time' ? [] : array_values($this->getDisabledDates());
$minTime = $this->getMinTime();
$maxTime = $this->getMaxTime();
if ($min === null && $max === null && $disabled === [] && $minTime === null && $maxTime === null) {
return [];
}
$rule = new DateWithinBounds($min, $max, $disabled, $this->getDisplayFormat(), $minTime, $maxTime);
return $this->isRequired() ? [$rule] : ['nullable', $rule];
}
/** A time or a datetime — a value with a clock half the browser has to pick. */
private function hasClock(): bool
{
return $this->mode === 'time' || $this->mode === 'datetime';
}
/**
* The clock step, in minutes, when the field has one — or null.
*
* A step decides the native control. To the browser `step` is a validation
* rule, not a wheel: iOS offers every minute whatever it says, then the
* field refuses the pick. So a stepped clock goes native as a `<select>` of
* these slots instead of `<input type="time">` (with a native date input
* beside it on a datetime), and a phone can only give back a slot.
*/
public function getSlotInterval(): ?int
{
if (! $this->hasClock()) {
return null;
}
return match (true) {
($this->getMinutesStep() ?? 1) > 1 => $this->getMinutesStep(),
($this->getHoursStep() ?? 1) > 1 => $this->getHoursStep() * 60,
default => null,
};
}
/**
* The touch control here is the wheel (`partials.wheel-picker`): a time, a
* date or a datetime. A month is the browser's control everywhere.
*/
protected function supportsTouchOnMobile(): bool
{
return in_array($this->mode, ['time', 'date', 'datetime'], true);
}
/** The wheel is its own trigger, beside the hidden desktop one. */
protected function touchControlIdSuffix(): ?string
{
return '-wheel';
}
/** Whether the native control is a list of clock slots rather than a time input. */
public function usesNativeSlots(): bool
{
return $this->getSlotInterval() !== null;
}
/**
* The clock slots as a native `<select>`'s options: `value => label`, in the
* state's clock shape, walking the day at {@see getSlotInterval()}.
*
* A time field leaves out what its bounds forbid, so the list offers only
* what will save. A datetime's bounds belong to a day, not to the clock, so
* its slots are the whole day and the server rule holds the boundary days.
*
* A current value between two slots (the interval changed, or it was typed
* on a desktop) is kept in the list, in order, so the element shows it
* instead of silently blanking.
*
* @return array<string, string>
*/
public function getSlotOptions(mixed $state = null): array
{
$interval = max(1, $this->getSlotInterval() ?? 1);
// A time is bounded by its own min/max and the window; a datetime's
// slots are every day's clock, so only the daily window narrows them.
[$min, $max] = $this->mode === 'time'
? $this->getTimeBoundsFor()
: [$this->getMinTime(), $this->getMaxTime()];
// The state is H:i, or H:i:s with seconds; slots key by that shape.
$length = $this->hasSeconds() ? 8 : 5;
$slots = [];
for ($minute = 0; $minute < 24 * 60; $minute += $interval) {
$time = sprintf('%02d:%02d:00', intdiv($minute, 60), $minute % 60);
if (($min !== null && $time < $min) || ($max !== null && $time > $max)) {
continue;
}
$slots[substr($time, 0, $length)] = $time;
}
$current = is_string($state) && $state !== '' ? DateBoundary::timePart($state) : null;
if ($current !== null) {
$slots[substr($current, 0, $length)] = $current;
asort($slots);
}
return array_map(fn (string $time): string => $this->formatSlotLabel($time), $slots);
}
/** A slot as the custom list labels it: displayFormat() when set, else the bare time. */
private function formatSlotLabel(string $time): string
{
// A datetime's display format carries a date a bare slot does not have.
$display = $this->mode === 'time' ? $this->getDisplayFormat() : null;
$parsed = $display === null ? null : Carbon::createFromFormat('H:i:s', $time);
if ($display === null || $parsed === null) {
return substr($time, 0, $this->hasSeconds() ? 8 : 5);
}
return $parsed->format($display);
}
public function getFirstDayOfWeek(): int
{
if ($this->firstDayOfWeek !== null) {
return $this->firstDayOfWeek;
}
try {
return (int) config('wire-forms.first_day_of_week', 1);
} catch (\Throwable) {
// As above: no container, and 1 (Monday) is the shipped default.
return 1;
}
}
/**
* The calendar matches these against its own `Y-m-d` cells, so they go
* through the same normalization as the bounds.
*
* @return array<int, string>
*/
public function getDisabledDates(): array
{
return array_values(array_filter(array_map(
fn (mixed $date): ?string => DateBoundary::min($date, 'Y-m-d'),
$this->evaluate($this->disabledDates),
)));
}
public function shouldCloseOnDateSelection(): bool
{
return $this->closeOnDateSelection;
}
public function hasSeconds(): bool
{
return $this->withSeconds;
}
public function getHoursStep(): ?int
{
return $this->hoursStep;
}
public function getMinutesStep(): ?int
{
return $this->minutesStep;
}
public function getSecondsStep(): ?int
{
return $this->secondsStep;
}
public function getTimezone(): ?string
{
return $this->timezone;
}
public function getNativeInputType(): string
{
return match ($this->mode) {
'date' => 'date',
'month' => 'month',
'time' => 'time',
default => 'datetime-local',
};
}
/**
* The native input's `step`, in seconds, or null for the browser's default.
*
* It is what makes a native time show seconds at all — the default step is
* a minute — and the stride the browser's own validation holds a value to.
* The finest configured unit wins: seconds, then minutes, then hours. A date
* or a month has no clock, so no step.
*/
public function getNativeStep(): ?int
{
if ($this->mode !== 'time' && $this->mode !== 'datetime') {
return null;
}
return match (true) {
$this->hasSeconds() => max(1, $this->getSecondsStep() ?? 1),
$this->getMinutesStep() !== null => max(1, $this->getMinutesStep()) * 60,
$this->getHoursStep() !== null => max(1, $this->getHoursStep()) * 3600,
default => null,
};
}
/**
* Stored value → widget state.
*
* State must stay in the widget's own parseable format (a native
* <input type="date"> demands Y-m-d; the custom picker parses Y-m-d,
* Y-m-d\TH:i and H:i), so format() cannot reach here — it describes how the
* value is *stored*, and applies on the way out instead.
*
* timezone() does apply here: the value is stored in the app zone and shown
* in the field's. Its counterpart in dehydrateState() converts back, and the
* two must always ship together — converting only inbound would write the
* shifted value straight back and silently move the time.
*/
public function hydrateState(mixed $value, ?Model $record = null): mixed
{
$zone = $this->getTimezone();
if ($zone === null || $value === null || $value === '' || ! $this->hasTimeComponent()) {
return $value;
}
return $this->parse($value, config('app.timezone'))
?->setTimezone($zone)
->format($this->getStateFormat());
}
/**
* Widget state → stored value: apply the field's timezone and format().
*/
public function dehydrateState(mixed $state, ?Model $record = null): mixed
{
if ($state === null || $state === '') {
return null;
}
// A date-only or time-only value carries no instant to convert; only a
// datetime does. Shifting a bare date by a timezone would move the day.
$zone = $this->hasTimeComponent() ? $this->getTimezone() : null;
// Both knobs are opt-in. Without them the state IS what should be
// stored, and reformatting anyway would be a silent BC break: getFormat()
// falls back to config('wire-forms.date_format') — 'd.m.Y' in a default
// install — so every field that never called format() would quietly start
// writing '09.03.2026' into a date column that had held '2026-03-09'.
if ($this->format === null && $zone === null) {
return $state;
}
$date = $this->parse($state, $zone ?? config('app.timezone'));
if ($date === null) {
return $state;
}
if ($zone !== null) {
$date = $date->setTimezone(config('app.timezone'));
}
// Only an explicit format() may change the stored shape; a timezone-only
// field keeps writing the state's own format.
return $date->format($this->format ?? $this->getStateFormat());
}
/**
* Only a datetime has an instant a timezone can move; 'date', 'month' and
* 'time' are wall-clock values that a conversion would corrupt.
*/
private function hasTimeComponent(): bool
{
return $this->mode === 'datetime';
}
private function parse(mixed $value, string $timezone): ?Carbon
{
try {
return Carbon::parse((string) $value, $timezone);
} catch (\Throwable) {
// A probe over whatever the model or the request handed over: an
// empty string, a half-typed date, a column holding something else.
// "Not a date" is the answer every caller here is asking for, and
// each has its own empty state for it — a picker that throws while
// the user is still typing is the worse failure.
return null;
}
}
/**
* The format the widget's state is written in — what getStateType() casts to.
*/
private function getStateFormat(): string
{
return substr($this->getStateType(), 5);
}
public function getStateType(): string
{
// Store a mode-appropriate date STRING (not a Carbon) so the value stays
// serializable in Livewire state and parseable by the picker/native input.
return 'date:'.match ($this->mode) {
'date' => 'Y-m-d',
'month' => 'Y-m',
'time' => $this->hasSeconds() ? 'H:i:s' : 'H:i',
// 'T' separator so the native datetime-local input accepts the value
// (the custom picker's parser handles it too).
default => $this->hasSeconds() ? 'Y-m-d\TH:i:s' : 'Y-m-d\TH:i',
};
}
protected function viewName(): string
{
return 'wire-forms::components.date-time-picker';
}
}