src/aria/widgets/controllers/DateController.js
function (internalValue) {
            var report = new ariaWidgetsControllersReportsControllerReport();
            if (internalValue == null) {
                report.ok = true;
                this._dataModel.jsDate = null;
                this._dataModel.displayText = "";
            } else if (!ariaUtilsType.isDate(internalValue)) {
                report.ok = false;
            } else {
                // remove the time, so that comparisons with minValue and maxValue are
                // correct.
                internalValue = ariaUtilsDate.removeTime(internalValue);
                if (this._minValue && internalValue < this._minValue) {
                    report.ok = false;
                    report.errorMessages.push(this.getErrorMessage("minValue"));
                } else if (this._maxValue && internalValue > this._maxValue) {
                    report.ok = false;
                    report.errorMessages.push(this.getErrorMessage("maxValue"));
                } else {
                    report.ok = true;
                    this._dataModel.jsDate = internalValue;
                    this._dataModel.displayText = ariaUtilsDate.format(internalValue, this._pattern);
                }
            }
            if (report.ok) {
                report.text = this._dataModel.displayText;
                report.value = this._dataModel.jsDate;
            }
            return report;
        }
function (internalValue) {
            var report = new ariaWidgetsControllersReportsControllerReport();
            if (internalValue == null) {
                report.ok = true;
                this._dataModel.jsDate = null;
                this._dataModel.displayText = "";
            } else if (!ariaUtilsType.isDate(internalValue)) {
                report.ok = false;
            } else {
                // remove the time, so that comparisons with minValue and maxValue are
                // correct.
                internalValue = ariaUtilsDate.removeTime(internalValue);
                if (this._minValue && internalValue < this._minValue) {
                    report.ok = false;
                    report.errorMessages.push(this.getErrorMessage("minValue"));
                } else if (this._maxValue && internalValue > this._maxValue) {
                    report.ok = false;
                    report.errorMessages.push(this.getErrorMessage("maxValue"));
                } else {
                    report.ok = true;
                    this._dataModel.jsDate = internalValue;
                    this._dataModel.displayText = ariaUtilsDate.format(internalValue, this._pattern);
                }
            }
            if (report.ok) {
                report.text = this._dataModel.displayText;
                report.value = this._dataModel.jsDate;
            }
            return report;
        }
function ( internalValue ) { var report = new ariaWidgetsControllersReportsControllerReport ( ) ; if ( internalValue == null ) { report . ok = true ; this . _dataModel . jsDate = null ; this . _dataModel . displayText = "" ; } else if ( ! ariaUtilsType . isDate ( internalValue ) ) { report . ok = false ; } else { // remove the time, so that comparisons with minValue and maxValue are // correct. internalValue = ariaUtilsDate . removeTime ( internalValue ) ; if ( this . _minValue && internalValue < this . _minValue ) { report . ok = false ; report . errorMessages . push ( this . getErrorMessage ( "minValue" ) ) ; } else if ( this . _maxValue && internalValue > this . _maxValue ) { report . ok = false ; report . errorMessages . push ( this . getErrorMessage ( "maxValue" ) ) ; } else { report . ok = true ; this . _dataModel . jsDate = internalValue ; this . _dataModel . displayText = ariaUtilsDate . format ( internalValue , this . _pattern ) ; } } if ( report . ok ) { report . text = this . _dataModel . displayText ; report . value = this . _dataModel . jsDate ; } return report ; }
override TextDataController.checkValue
@param {String} internalValue - Internal value of to be validated
@return {aria.widgets.controllers.reports.ControllerReport}
override TextDataController . checkValue