From f162582e32c92539622dc6b4e8f7ee3706d50f7e Mon Sep 17 00:00:00 2001 From: Mike Ho Date: Thu, 12 Aug 2010 05:49:54 -0700 Subject: [PATCH] Updated cleaned up JS for DateTimePicker (Klucznik) --- .../qcodo/_core/qform/QDateTimePickerBase.class.php | 2 +- www/assets/js/_core/date_time_picker.js | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/includes/qcodo/_core/qform/QDateTimePickerBase.class.php b/includes/qcodo/_core/qform/QDateTimePickerBase.class.php index 4a381d3c..56a2497c 100644 --- a/includes/qcodo/_core/qform/QDateTimePickerBase.class.php +++ b/includes/qcodo/_core/qform/QDateTimePickerBase.class.php @@ -116,7 +116,7 @@ protected function GetControlHtml() { if ($strStyle) $strAttributes .= sprintf(' style="%s"', $strStyle); - $strCommand = sprintf(' onchange="qc.dttChange(\'%s\', this);"', $this->strControlId); + $strCommand = sprintf(' onchange="qc.dtpChange(\'%s\', this);"', $this->strControlId); if ($this->dttDateTime) $dttDateTime = $this->dttDateTime; diff --git a/www/assets/js/_core/date_time_picker.js b/www/assets/js/_core/date_time_picker.js index e99a478d..7c9e1dc2 100644 --- a/www/assets/js/_core/date_time_picker.js +++ b/www/assets/js/_core/date_time_picker.js @@ -1,4 +1,8 @@ - function Qcodo__DateTimePicker_Change(strControlId, objListbox) { +///////////////////////////////////////////// +// Control: Date Time Picker functionality +///////////////////////////////////////////// + + qcodo.dateTimePickerChange = function(strControlId, objListbox) { var objMonth = document.getElementById(strControlId + "_lstMonth"); var objDay = document.getElementById(strControlId + "_lstDay"); var objYear = document.getElementById(strControlId + "_lstYear"); @@ -74,4 +78,6 @@ }; }; }; - }; \ No newline at end of file + }; + + qc.dtpChange = qcodo.dateTimePickerChange; \ No newline at end of file