$prev_date = dpGetParam($_GET, 'uts', null);
// if $date is empty, set to null
$date = $date !== '' ? $date : null;
$this_month = new CDate($date);
$uistyle = $AppUI->getPref('UISTYLE') ? $AppUI->getPref('UISTYLE') : $dPconfig['host_style'];
?>
<a href="javascript: void(0);" onClick="clickDay('', '');">borrar fecha</a>
<?php 
$cal = new CMonthCalendar($this_month);
$cal->setStyles('poptitle', 'popcal');
$cal->showWeek = false;
$cal->callback = $callback;
$cal->setLinkFunctions('clickDay');
if (isset($prev_date)) {
    $highlights = array($prev_date => "#FF8888");
    $cal->setHighlightedDays($highlights);
    $cal->showHighlightedDays = true;
}
echo $cal->show();
?>
<script language="javascript">
/**
 *	@param string Input date in the format YYYYMMDD
 *	@param string Formatted date
 */
	function clickDay( idate, fdate ) {
		window.opener.<?php 
echo $callback;
?>
(idate,fdate);
		if (<?php