Skip to content

Commit c5addf0

Browse files
committed
feat(core): added more date picker and time picker options
1 parent 7cf7e1d commit c5addf0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/flutter_form_builder/lib/src/fields/form_builder_date_time_picker.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ class FormBuilderDateTimePicker extends FormBuilderField<DateTime> {
126126
final TimePickerEntryMode timePickerInitialEntryMode;
127127
final StrutStyle? strutStyle;
128128
final SelectableDayPredicate? selectableDayPredicate;
129+
final Offset? anchorPoint;
130+
final EntryModeChangeCallback? onEntryModeChanged;
129131

130132
/// Creates field for `Date`, `Time` and `DateTime` input
131133
FormBuilderDateTimePicker({
@@ -193,6 +195,8 @@ class FormBuilderDateTimePicker extends FormBuilderField<DateTime> {
193195
this.routeSettings,
194196
this.strutStyle,
195197
this.selectableDayPredicate,
198+
this.anchorPoint,
199+
this.onEntryModeChanged,
196200
}) : super(
197201
key: key,
198202
initialValue: initialValue,
@@ -347,6 +351,7 @@ class _FormBuilderDateTimePickerState
347351
initialEntryMode: widget.initialEntryMode,
348352
routeSettings: widget.routeSettings,
349353
currentDate: widget.currentDate,
354+
anchorPoint: widget.anchorPoint,
350355
);
351356
}
352357

@@ -364,6 +369,9 @@ class _FormBuilderDateTimePickerState
364369
helpText: widget.helpText,
365370
confirmText: widget.confirmText,
366371
cancelText: widget.cancelText,
372+
anchorPoint: widget.anchorPoint,
373+
errorInvalidText: widget.errorInvalidText,
374+
onEntryModeChanged: widget.onEntryModeChanged,
367375
);
368376
return timePickerResult ??
369377
(currentValue != null ? TimeOfDay.fromDateTime(currentValue) : null);

0 commit comments

Comments
 (0)