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) |
||
93 | |||
94 | /** |
||
95 | * Adjust timezone of date returned by DatePicker. |
||
96 | * |
||
97 | * @param string $date |
||
98 | * Date returned by "jQuery('#selector').datepicker('getDate')". |
||
99 | * |
||
100 | * @return string |
||
101 | * Date with correct timezone. |
||
102 | * |
||
103 | * @link http://stackoverflow.com/a/31560608 |
||
104 | */ |
||
105 | private function adjustTimezone($date) |
||
115 | |||
116 | /** |
||
117 | * @param string $date |
||
118 | * The string to parse. |
||
119 | * |
||
120 | * @return string |
||
121 | */ |
||
122 | protected static function jsDate($date) |
||
126 | } |
||
127 |