/**
  * Get events for the selected calendars.
  * @param string $selectedMyCalendarIds
  * @param string $selectedSharedCalendarIds
  * @param string $startDate
  * @param string $endDate
  * @param string $dateRangeType
  */
 public function actionGetDayEvents($selectedMyCalendarIds = null, $selectedSharedCalendarIds = null, $startDate = null, $endDate = null, $dateRangeType = null)
 {
     $dataProvider = CalendarUtil::processAndGetDataProviderForEventsData($selectedMyCalendarIds, $selectedSharedCalendarIds, $startDate, $endDate, $dateRangeType, false);
     $items = CalendarUtil::processDataProviderAndGetCalendarItems($dataProvider);
     $modifiedItems = array();
     foreach ($items as $item) {
         $item['start'] = CalendarUtil::getFullCalendarFormattedDateTimeElement($item['start']);
         $startDateTime = strtotime($item['start']);
         if (date('Y-m-d', $startDateTime) == $startDate) {
             $item['end'] = CalendarUtil::getFullCalendarFormattedDateTimeElement($item['end']);
             $modifiedItems[] = $item;
         }
     }
     $modifiedItems = CalendarUtil::populateDetailsUrlForCalendarItems($modifiedItems);
     $calItemListView = new CalendarItemsListView($this->getId(), $this->getModule()->getId(), $modifiedItems, GetUtil::getData());
     Yii::app()->getClientScript()->setToAjaxMode();
     echo $calItemListView->render();
 }
 public function testGetFullCalendarFormattedDateTimeElement()
 {
     $startDateTime = CalendarUtil::getFullCalendarFormattedDateTimeElement('2014-01-10');
     $this->assertEquals('2014-01-10', date('Y-m-d', strtotime($startDateTime)));
 }