Scheduler Date Time
Ok, here is what I have and It renders only the date:
function doBeforeRender($data){
$temp1 = $data->get_value("startdate");
$temp2 = $data->get_value("starttime");
$data->set_value("start_date",$temp1." ".$temp2);
$temp3 = $data->get_value("enddate");
$temp4 = $data->get_value("endtime");
$data->set_value("end_date",$temp3." ".$temp4);
}
$scheduler = new schedulerConnector($res);
$scheduler->event->attach("beforeRender",doBeforeRender);
$scheduler->render_sql("SELECT `id`, `startdate`, `starttime`, `enddate`, `endtime`, `subject` FROM `notes` WHERE type = 'EV'","id","startdate,enddate,subject","starttime,endtime","");
- <![CDATA[ 2009-10-02
]]>
</start_date>
- <![CDATA[ 2009-10-02
]]>
</end_date>
- <![CDATA[ Christie Spencer - dispense
]]>
</text>
</event>
- <![CDATA[ 2009-10-02
]]>
</start_date>
- <![CDATA[ 2009-10-02
]]>
</end_date>
- <![CDATA[ Harper - CL Dispense
]]>
</text>
</event>
There is the issue in the set_value calls: Try to use startdate and enddate instead of start_date and end_date here:
function doBeforeRender($data){
$temp1 = $data->get_value("startdate");
$temp2 = $data->get_value("starttime");
$data->set_value("startdate",$temp1." ".$temp2);
$temp3 = $data->get_value("enddate");
$temp4 = $data->get_value("endtime");
$data->set_value("enddate",$temp3." ".$temp4);
}