Skip to content

Commit f77ef38

Browse files
committed
fix: add proper handling of null values
Closes #24
1 parent 9b995bd commit f77ef38

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

vcf-date-range-picker/src/main/java/com/vaadin/componentfactory/EnhancedDateRangePicker.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,4 +1226,17 @@ public void removePresetByIds(String ... ids) {
12261226
this.getElement().executeJs("this.removePreselectionById($0)", id);
12271227
}
12281228
}
1229+
1230+
@Override
1231+
public void setValue(DateRange value) {
1232+
if(value == null) {
1233+
getElement().executeJs("this.value = 'null;null';");
1234+
}
1235+
super.setValue(value);
1236+
}
1237+
1238+
@Override
1239+
public DateRange getEmptyValue() {
1240+
return null;
1241+
}
12291242
}

0 commit comments

Comments
 (0)