From f3e65e200444acbb2aa58fc2ca63245d18e3a0b5 Mon Sep 17 00:00:00 2001 From: tof <> Date: Wed, 24 Sep 2008 13:09:23 +0000 Subject: Added TActiveDatePicker --- .../protected/pages/ActiveDatePicker.page | 17 +++++++++ .../protected/pages/ActiveDatePicker.php | 42 ++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100755 tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page create mode 100755 tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.php (limited to 'tests/FunctionalTests/active-controls/protected/pages') diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page new file mode 100755 index 00000000..ed35293e --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page @@ -0,0 +1,17 @@ + + + + +

TActiveDatePicker test

+

+ +
+ + + + +

+ +
+ + \ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.php new file mode 100755 index 00000000..6d78a664 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.php @@ -0,0 +1,42 @@ +IsPostBack) + $this->datepicker->setTimeStamp(time()); + } + + public function testDatePicker($sender, $param){ + $this->status->Text = $this->datepicker->getText(); + } + + public function today ($sender, $param) + { + $this->datepicker->setTimestamp(time()); + } + + public function increase ($sender, $param) + { + $this->datepicker->setTimestamp(strtotime('+1 day', $this->datepicker->getTimestamp())); + } + public function decrease ($sender, $param) + { + $this->datepicker->setTimestamp(strtotime('-1 day', $this->datepicker->getTimestamp())); + } + + public function toggleMode ($sender, $param) + { + if ($this->datepicker->getInputMode()==TDatePickerInputMode::DropDownList) + $this->datepicker->setInputMode(TDatePickerInputMode::TextBox); + else + $this->datepicker->setInputMode(TDatePickerInputMode::DropDownList); + } + + } + + +?> \ No newline at end of file -- cgit v1.2.3