/**
 * User updates the date to show for the daily summary. Update dependent data tables.
 */
function wpdev_select_daily_summary_day()
{
    $selectedDate = DateTime::createFromFormat('!d.m.Y', $_POST['calendar_selected_date'], new DateTimeZone('UTC'));
    $ds = new DailySummaryData($selectedDate);
    $ds->doSummaryUpdate();
    ?>
 
    <script type="text/javascript">
        document.getElementById('daily_summary_contents').innerHTML = <?php 
    echo json_encode($ds->toHtml());
    ?>
;
    </script>
    <?php 
}