1 | <?php |
||
7 | class JQuery extends DatePickerBase |
||
8 | { |
||
9 | const DATE_ADJUSTER = 'window.__behatDatePickerDateAdjuster'; |
||
10 | |||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $jsDate = ''; |
||
15 | |||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | */ |
||
19 | public function initialize() |
||
23 | |||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | */ |
||
27 | public function setDate() |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | public function isDateSelected() |
||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | public function isDateAvailable() |
||
76 | |||
77 | /** |
||
78 | * @param array $arguments |
||
79 | * jQuery.fn.datepicker arguments. |
||
80 | * |
||
81 | * @return mixed |
||
82 | * Result of JS execution. |
||
83 | */ |
||
84 | private function datePicker(array $arguments) |
||
90 | |||
91 | /** |
||
92 | * Adjust timezone of date returned by DatePicker. |
||
93 | * |
||
94 | * @param string $date |
||
95 | * Date returned by "jQuery('#selector').datepicker('getDate')". |
||
96 | * |
||
97 | * @return string |
||
98 | * Date with correct timezone. |
||
99 | * |
||
100 | * @link http://stackoverflow.com/a/31560608 |
||
101 | */ |
||
102 | private function adjustTimezone($date) |
||
112 | |||
113 | /** |
||
114 | * @param string $date |
||
115 | * The string to parse. |
||
116 | * |
||
117 | * @return string |
||
118 | */ |
||
119 | protected static function jsDate($date) |
||
123 | } |
||
124 |