mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-24 23:01:57 +08:00
@ -27,14 +27,18 @@ class E2EPage {
|
||||
'l\u00f8r'
|
||||
];
|
||||
|
||||
onChange(ev) {
|
||||
onChange(ev: any) {
|
||||
console.log("Changed", ev);
|
||||
}
|
||||
|
||||
onCancel(ev) {
|
||||
onCancel(ev: any) {
|
||||
console.log("Canceled", ev);
|
||||
}
|
||||
|
||||
clearLeapYear() {
|
||||
this.leapYearsSummerMonths = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -68,4 +68,6 @@
|
||||
<code>Leap year, summer months: {{leapYearsSummerMonths}}</code><br>
|
||||
</p>
|
||||
|
||||
<button (click)="clearLeapYear()">Clear Leap Years</button>
|
||||
|
||||
</ion-content>
|
||||
|
@ -442,6 +442,20 @@ describe('DateTime', () => {
|
||||
expect(datetime.getValue()).toEqual({});
|
||||
});
|
||||
|
||||
it('should clear out existing value with blank value', () => {
|
||||
datetime.setValue('1994-12-15T13:47:20.789Z');
|
||||
datetime.setValue(null);
|
||||
expect(datetime.getValue()).toEqual({});
|
||||
|
||||
datetime.setValue('1994-12-15T13:47:20.789Z');
|
||||
datetime.setValue(undefined);
|
||||
expect(datetime.getValue()).toEqual({});
|
||||
|
||||
datetime.setValue('1994-12-15T13:47:20.789Z');
|
||||
datetime.setValue('');
|
||||
expect(datetime.getValue()).toEqual({});
|
||||
});
|
||||
|
||||
it('should not parse a value with blank value', () => {
|
||||
datetime.setValue(null);
|
||||
expect(datetime.getValue()).toEqual({});
|
||||
|
Reference in New Issue
Block a user