mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(datetime): ionChange/ngModel returns the correct value
This commit is contained in:
@@ -143,9 +143,13 @@ export class BaseInput<T> extends Ion implements CommonInput<T> {
|
||||
if (isUndefined(val)) {
|
||||
return false;
|
||||
}
|
||||
const normalized = (val === null)
|
||||
? deepCopy(this._defaultValue)
|
||||
: this._inputNormalize(val);
|
||||
let normalized;
|
||||
if (val === null) {
|
||||
normalized = deepCopy(this._defaultValue);
|
||||
this._inputReset();
|
||||
} else {
|
||||
normalized = this._inputNormalize(val);
|
||||
}
|
||||
|
||||
const notUpdate = isUndefined(normalized) || !this._inputShouldChange(normalized);
|
||||
if (notUpdate) {
|
||||
@@ -285,7 +289,12 @@ export class BaseInput<T> extends Ion implements CommonInput<T> {
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
initFocus() {}
|
||||
initFocus() { }
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
_inputReset() { }
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
|
||||
Reference in New Issue
Block a user