Menu

#133 TimeFormat can not edit in MonthCalendar and DateTimePicker

open
nobody
Component (61)
5
2008-11-27
2008-11-27
wniva
No

In the classes MonthCalendar and DateTimePicker I have found a bug, that the timeformat is static in source code.

My proposed solution would be:

comctrls.inc.php:
add lines before "dumpContents":
(in class MonthCalendar and DateTimePicker)

protected $_timeformat = 12;
function getTimeFormat() { return $this->_timeformat; }
function setTimeFormat($value) { $this->_timeformat=$value; }

modify line (in "dumpContents"):
(in class MonthCalendar and DateTimePicker)

'timeFormat' => '12' to 'timeFormat' => $this->_timeformat

advance.package.php:
add lines registerPropertyValues("DateTimePicker","TimeFormat",array('12','24'));
registerPropertyValues("MonthCalendar","TimeFormat",array('12','24'));

Discussion


Log in to post a comment.