|
37 | 37 | import com.vaadin.flow.component.dependency.JavaScript; |
38 | 38 | import com.vaadin.flow.component.dependency.JsModule; |
39 | 39 | import com.vaadin.flow.component.dependency.NpmPackage; |
| 40 | +import com.vaadin.flow.component.shared.HasClearButton; |
40 | 41 | import com.vaadin.flow.function.SerializableConsumer; |
41 | 42 | import com.vaadin.flow.function.SerializableFunction; |
42 | 43 | import com.vaadin.flow.internal.JsonSerializer; |
|
61 | 62 | @NpmPackage(value = "@vaadin-component-factory/vcf-date-range-picker", version = "4.9.2") |
62 | 63 | @JsModule("@vaadin-component-factory/vcf-date-range-picker/vcf-date-range-picker.js") |
63 | 64 | public class EnhancedDateRangePicker extends GeneratedVaadinDatePicker<EnhancedDateRangePicker, DateRange> |
64 | | - implements HasSize, HasValidation, HasComponents { |
| 65 | + implements HasSize, HasValidation, HasComponents, HasClearButton { |
65 | 66 |
|
66 | 67 | private static final String PROP_AUTO_OPEN_DISABLED = "autoOpenDisabled"; |
67 | 68 | private static DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ISO_LOCAL_DATE; |
@@ -564,33 +565,7 @@ private boolean isInvalid(DateRange value) { |
564 | 565 | boolean endDateBeforeStartDate = value != null && value.getStartDate() != null && value.getEndDate() != null && value.getEndDate().isBefore(value.getStartDate()); |
565 | 566 | return startDateInvalid || endDateInvalid || endDateBeforeStartDate; |
566 | 567 | } |
567 | | - |
568 | | - /** |
569 | | - * Sets displaying a clear button in the datepicker when it has value. |
570 | | - * <p> |
571 | | - * The clear button is an icon, which can be clicked to set the datepicker |
572 | | - * value to {@code null}. |
573 | | - * |
574 | | - * @param clearButtonVisible |
575 | | - * {@code true} to display the clear button, {@code false} to |
576 | | - * hide it |
577 | | - */ |
578 | | - @Override |
579 | | - public void setClearButtonVisible(boolean clearButtonVisible) { |
580 | | - super.setClearButtonVisible(clearButtonVisible); |
581 | | - } |
582 | | - |
583 | | - /** |
584 | | - * Gets whether this datepicker displays a clear button when it has value. |
585 | | - * |
586 | | - * @return {@code true} if this datepicker displays a clear button, |
587 | | - * {@code false} otherwise |
588 | | - * @see #setClearButtonVisible(boolean) |
589 | | - */ |
590 | | - public boolean isClearButtonVisible() { |
591 | | - return super.isClearButtonVisibleBoolean(); |
592 | | - } |
593 | | - |
| 568 | + |
594 | 569 | /** |
595 | 570 | * Sets displaying a clear button in the datepicker when it has value. |
596 | 571 | * <p> |
|
0 commit comments