Get KoolPHP UI with 30% OFF!

Changing The Timepicker class to make input readonly.

Anthony Amolochitis
1. Add the property to the proper class...
class KoolDateTimePicker
{
	var $id;
	var $_version = "1.9.0.0";
        
        /**
         * @author Anthony Amolochitis <amolochitis@gmail.com>
         * Added : 20016-09-29
         * Purpose : Do not allow user to input time, only pick.
         * Reason  : User is not dependable to give good input.
         * @var boolean
         */
	var $InputBoxReadonly = true ; 
	var $styleFolder;
	var $scriptFolder;
	var $_style;	
	...
        ...

2. Alter the render procedure for the time picker.
	function RenderDateTimePicker()
	{   
            $readOnlyText = $this->InputBoxReadonly ? " readonly='readonly'" : "" ;
            $_tpl_main = "{trademark}<div id='{id}_bound' style='{stylecss}' class='{style}KCD'>{view}{datepicker}{timepicker}{settings}</div>";		
            $_tpl_trademark = "\n<!--KoolDateTimePicker version {version} - www.koolphp.net -->\n";
            $_tpl_datepicker = "<div id='{id}_datepicker' class='kcdDatePicker' style='display:none;position:absolute;'>{calendar}</div>";
            $_tpl_timepicker = "<div id='{id}_timepicker' class='kcdTimePicker' style='display:none;position:absolute;'>{timeview}</div>";
            $_tpl_view = "<table border='0' cellpadding='0' cellspacing='0' style='width:100%;'><tr><td class='kcdInput'><div><input $readOnlyText id='{id}' name='{id}' value='{value}' style='width:100%;{style}' type='text' autocomplete='off'/></div></td>{dateopener}{timeopener}</tr></table>";
            $_datepicker = "";
            $_dateopener = "";
Posted Oct 1, 2016 Kool -
Peter
Thanks Anthony for your suggestion :)
Posted Oct 4, 2016 Kool -