QCalendar::__construct PHP Method

__construct() public method

The constructor for the QCalendar QControl object
public __construct ( mixed $objParentObject, QDateTimeTextBox $dtxLinkedControl, string $strControlId = null, boolean $blnAutoShowOnClick = true )
$objParentObject mixed
$dtxLinkedControl QDateTimeTextBox the linked QDateTimeTextBox to this calendar icon/control
$strControlId string optional
$blnAutoShowOnClick boolean whether or not the calendar should automatically display upon clicking the qdatetimetexbox (default is yes/true)
    public function __construct($objParentObject, QDateTimeTextBox $dtxLinkedControl, $strControlId = null, $blnAutoShowOnClick = true)
    {
        try {
            parent::__construct($objParentObject, $strControlId);
        } catch (QCallerException $objExc) {
            $objExc->IncrementOffset();
            throw $objExc;
        }
        // Setup Linked DateTimeTextBox control
        $this->dtxLinkedControl = $dtxLinkedControl;
        // Other Setup
        $this->strCalendarImageSource = __IMAGE_ASSETS__ . '/calendar.png';
        if ($blnAutoShowOnClick) {
            $this->dtxLinkedControl->RemoveAllActions(QClickEvent::EventName);
            $this->dtxLinkedControl->AddAction(new QClickEvent(), new QJavaScriptAction("qc.getC('" . $this->strControlId . "').showCalendar(); "));
            $this->dtxLinkedControl->AddAction(new QClickEvent(), new QBlurControlAction($this->dtxLinkedControl));
            $this->dtxLinkedControl->AddAction(new QClickEvent(), new QTerminateAction());
        }
    }