mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2026-01-08 21:36:13 +00:00
chore: add loose restrictions to date time text field (#7024)
* chore: add loose restrictions to date time text field * chore: remove date formatter
This commit is contained in:
parent
7bc358d7ac
commit
ed646ccba2
@ -301,6 +301,14 @@ class _DateTimeTextFieldState extends State<DateTimeTextField> {
|
||||
focusNode: timeFocusNode,
|
||||
controller: timeTextController,
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
maxLength: widget.timeFormat == TimeFormatPB.TwelveHour
|
||||
? 8 // 12:34 PM = 8 characters
|
||||
: 5, // 12:34 = 5 characters
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp('[0-9:AaPpMm]'),
|
||||
),
|
||||
],
|
||||
decoration: getInputDecoration(
|
||||
const EdgeInsetsDirectional.fromSTEB(6, 6, 12, 6),
|
||||
timeFormat.format(hintDate),
|
||||
@ -359,6 +367,7 @@ class _DateTimeTextFieldState extends State<DateTimeTextField> {
|
||||
isCollapsed: true,
|
||||
isDense: true,
|
||||
hintText: widget.showHint ? hintText : null,
|
||||
counterText: "",
|
||||
hintStyle: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user