Get KoolPHP UI with 30% OFF!

Trying to extend the calendar class

ADavid Wulkan
I don't have a good understanding of classes and I am trying to learn how to use OOP. Anyway, I've created this code hoping to have minimal code in the HTML file. I'm fairly certain my problem is in the extended class definition? Can anyone please assist me in how extending should be coded?
  class calclass1 extends KoolDatePicker {
    var $name;
    var $prompt;
    var $cal;
    public function __construct($name="",$prompt="") {
	$this->name = $name;
	$this->prompt = $prompt;
	$cal = new KoolDatePicker("$name"); //Create calendar object
	$cal->scriptFolder = $KoolControlsFolder."/KoolCalendar";//Set scriptFolder
	$cal->DateFormat = "m/d/y";
        echo "<div style='padding-top:10px;padding-bottom:10px;width:100px;'>";
        echo "$prompt (mm/dd/yy):<br/>";
        echo $cal->Render();
        echo "if($cal->Value!=null) {
        echo "   echo '<b>$prompt (mm/dd/yy):</b> '.$cal->Value;";
        echo "}";
        echo "</div>";

<!-- calclstest.php -->
<!-- 2016011 This function returns calendar start and end controls -->
<!--  -->
<!DOCTYPE html>
  include "inc/gvars.php";
  require_once $KoolControlsFolder."/KoolCalendar/koolcalendar.php";	
  require_once "calclass1.php";	
  $startdp = new calclass1("startdate","Start Date");
  $endtdp = new calclass1("enddate","End Date");
  echo dp->("startdate","Start Date");
  echo dp->get_name();
<td width="100px"><?php echo $startdp;?></td>
<td width="100px"><?php echo $enddp;?></td>
<td width="15px"></td>
<td width="150px" style="vertical-align:bottom">
  <div style="padding-top:10px;padding-bottom:10px;width:100px;">
    <input type="submit" value="Submit" />
Posted Jan 17, 2016 Kool