1 | <?php |
||
5 | class DateTime extends Field |
||
6 | { |
||
7 | protected $type = 'datetime'; |
||
8 | |||
9 | /** |
||
10 | * Make a new instance of a field. |
||
11 | * |
||
12 | * @param string $name |
||
13 | * @param string $label |
||
14 | * @return Field|\DateTime |
||
15 | */ |
||
16 | public static function make($name, $label = '') |
||
20 | |||
21 | /** |
||
22 | * Set format to military time (24 hrs). |
||
23 | * |
||
24 | * @return Field|Time |
||
25 | */ |
||
26 | public function military() |
||
30 | |||
31 | /** |
||
32 | * @param \DateTime $dateTime |
||
33 | * @param string $format |
||
34 | * @return $this |
||
35 | * @see https://editor.datatables.net/examples/dates/options-min-max.html |
||
36 | */ |
||
37 | public function minDate(\DateTime $dateTime, $format = 'Y-m-d') |
||
43 | |||
44 | /** |
||
45 | * @param \DateTime $dateTime |
||
46 | * @param string $format |
||
47 | * @return $this |
||
48 | * @see https://editor.datatables.net/examples/dates/options-min-max.html |
||
49 | */ |
||
50 | public function maxDate(\DateTime $dateTime, $format = 'Y-m-d') |
||
56 | |||
57 | /** |
||
58 | * @param bool $state |
||
59 | * @return $this |
||
60 | * @see https://editor.datatables.net/examples/dates/options-week-numbers.html |
||
61 | */ |
||
62 | public function showWeekNumber($state = true) |
||
68 | |||
69 | /** |
||
70 | * @param array $days |
||
71 | * @return $this |
||
72 | * @see https://editor.datatables.net/examples/dates/options-disable-days.html |
||
73 | */ |
||
74 | public function disableDays(array $days) |
||
80 | |||
81 | /** |
||
82 | * @param int $minutes |
||
83 | * @return $this |
||
84 | * @see https://editor.datatables.net/examples/dates/time-increment.html |
||
85 | */ |
||
86 | public function minutesIncrement($minutes) |
||
92 | |||
93 | /** |
||
94 | * @param int $seconds |
||
95 | * @return $this |
||
96 | * @see https://editor.datatables.net/examples/dates/time-increment.html |
||
97 | */ |
||
98 | public function secondsIncrement($seconds) |
||
104 | |||
105 | /** |
||
106 | * @param array $hours |
||
107 | * @return $this |
||
108 | * @see https://editor.datatables.net/examples/dates/datetime.html |
||
109 | */ |
||
110 | public function hoursAvailable(array $hours) |
||
116 | |||
117 | /** |
||
118 | * @param array $minutes |
||
119 | * @return $this |
||
120 | * @see https://editor.datatables.net/examples/dates/datetime.html |
||
121 | */ |
||
122 | public function minutesAvailable(array $minutes) |
||
128 | } |
||
129 |