2024-09-27 15:40:55 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
|
|
|
|
|
|
|
|
import '../form_widget.dart';
|
|
|
|
|
|
|
|
class FieldMonthsRangepicker extends FormWidgetField {
|
|
|
|
FieldMonthsRangepicker(
|
|
|
|
{required this.name,
|
|
|
|
required this.label,
|
|
|
|
required this.filterValue,
|
|
|
|
required this.onClear,
|
|
|
|
required this.onSelected,
|
|
|
|
required this.entries});
|
|
|
|
|
|
|
|
final String name;
|
|
|
|
final String label;
|
|
|
|
final String? filterValue;
|
|
|
|
final VoidCallback onClear;
|
|
|
|
final void Function(String?) onSelected;
|
|
|
|
final List<String> entries;
|
|
|
|
|
2024-10-29 16:15:11 +01:00
|
|
|
@override
|
2024-09-27 15:40:55 +02:00
|
|
|
Widget get() {
|
|
|
|
return SfDateRangePicker(
|
|
|
|
minDate: DateTime(2024, 1),
|
|
|
|
maxDate: DateTime(2024, 12, 31),
|
|
|
|
allowViewNavigation: false,
|
|
|
|
view: DateRangePickerView.year,
|
|
|
|
selectionMode: DateRangePickerSelectionMode.range,
|
|
|
|
onSelectionChanged: (DateRangePickerSelectionChangedArgs args) {},
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|