Skip to content

Commit dab75bc

Browse files
committed
fix: [3871] fixed Picker.setStartDate not working when not accompanied by setEndDate
1 parent c300c4e commit dab75bc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

CodenameOne/src/com/codename1/ui/spinner/Picker.java

+10
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,16 @@ private DateSpinner3D createDatePicker3D() {
505505
if (defaultValue.getTime() > endDate.getTime()) {
506506
defaultValue = startDate;
507507
}
508+
} else if (startDate != null) {
509+
out.setDateRange(startDate, null);
510+
if (defaultValue.getTime() < startDate.getTime()) {
511+
defaultValue = startDate;
512+
}
513+
} else if (endDate != null) {
514+
out.setDateRange(null, endDate);
515+
if (defaultValue.getTime() > endDate.getTime()) {
516+
defaultValue = endDate;
517+
}
508518
}
509519
if (value != null) {
510520
out.setValue(value);

0 commit comments

Comments
 (0)