Skip to content

Commit c3033bd

Browse files
committed
fix: few UI/usability issues with the time input field
1 parent a413746 commit c3033bd

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

frontend/app_flowy/lib/plugins/grid/application/cell/date_cal_bloc.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class DateCalBloc extends Bloc<DateCalEvent, DateCalState> {
108108
(err) {
109109
switch (ErrorCode.valueOf(err.code)!) {
110110
case ErrorCode.InvalidDateTimeFormat:
111-
updateCalData(none(), Some(timeFormatPrompt(err)));
111+
updateCalData(state.calData, Some(timeFormatPrompt(err)));
112112
break;
113113
default:
114114
Log.error(err);

frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/date_cell/date_editor.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ class _TimeTextFieldState extends State<_TimeTextField> {
261261
child: RoundedInputField(
262262
height: 40,
263263
focusNode: _focusNode,
264+
autoFocus: true,
264265
hintText: state.timeHintText,
265266
controller: _controller,
266267
style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500),

frontend/rust-lib/flowy-grid/src/services/field/type_options/date_type_option/date_type_option.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl DateTypeOptionPB {
5252

5353
let mut time = "".to_string();
5454
if has_time && self.include_time {
55-
let fmt = format!("{} {}", self.date_format.format_str(), self.time_format.format_str());
55+
let fmt = format!("{}{}", self.date_format.format_str(), self.time_format.format_str());
5656
time = format!("{}", utc.format_with_items(StrftimeItems::new(&fmt))).replace(&date, "");
5757
}
5858

0 commit comments

Comments
 (0)