@@ -123,7 +123,8 @@ class FormBuilderDateTimePicker extends FormBuilderFieldDecoration<DateTime> {
123
123
final EntryModeChangeCallback ? onEntryModeChanged;
124
124
final bool barrierDismissible;
125
125
126
- final bool readOnly;
126
+ /// If true, disables the picker so it's not shown when the field is tapped.
127
+ final bool disablePicker;
127
128
128
129
/// Creates field for `Date` , `Time` and `DateTime` input
129
130
FormBuilderDateTimePicker ({
@@ -193,7 +194,7 @@ class FormBuilderDateTimePicker extends FormBuilderFieldDecoration<DateTime> {
193
194
this .selectableDayPredicate,
194
195
this .anchorPoint,
195
196
this .onEntryModeChanged,
196
- this .readOnly = false ,
197
+ this .disablePicker = false ,
197
198
this .barrierDismissible = true ,
198
199
}) : super (
199
200
builder: (FormFieldState <DateTime ?> field) {
@@ -202,7 +203,7 @@ class FormBuilderDateTimePicker extends FormBuilderFieldDecoration<DateTime> {
202
203
return FocusTraversalGroup (
203
204
policy: ReadingOrderTraversalPolicy (),
204
205
child: TextField (
205
- onTap: readOnly ? () {} : () => state.showPicker (),
206
+ onTap: disablePicker ? () {} : () => state.showPicker (),
206
207
textDirection: textDirection,
207
208
textAlign: textAlign,
208
209
textAlignVertical: textAlignVertical,
0 commit comments