mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: few UI/usability issues with the time input field
This commit is contained in:
@ -108,7 +108,7 @@ class DateCalBloc extends Bloc<DateCalEvent, DateCalState> {
|
|||||||
(err) {
|
(err) {
|
||||||
switch (ErrorCode.valueOf(err.code)!) {
|
switch (ErrorCode.valueOf(err.code)!) {
|
||||||
case ErrorCode.InvalidDateTimeFormat:
|
case ErrorCode.InvalidDateTimeFormat:
|
||||||
updateCalData(none(), Some(timeFormatPrompt(err)));
|
updateCalData(state.calData, Some(timeFormatPrompt(err)));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Log.error(err);
|
Log.error(err);
|
||||||
|
@ -261,6 +261,7 @@ class _TimeTextFieldState extends State<_TimeTextField> {
|
|||||||
child: RoundedInputField(
|
child: RoundedInputField(
|
||||||
height: 40,
|
height: 40,
|
||||||
focusNode: _focusNode,
|
focusNode: _focusNode,
|
||||||
|
autoFocus: true,
|
||||||
hintText: state.timeHintText,
|
hintText: state.timeHintText,
|
||||||
controller: _controller,
|
controller: _controller,
|
||||||
style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500),
|
style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500),
|
||||||
|
@ -52,7 +52,7 @@ impl DateTypeOptionPB {
|
|||||||
|
|
||||||
let mut time = "".to_string();
|
let mut time = "".to_string();
|
||||||
if has_time && self.include_time {
|
if has_time && self.include_time {
|
||||||
let fmt = format!("{} {}", self.date_format.format_str(), self.time_format.format_str());
|
let fmt = format!("{}{}", self.date_format.format_str(), self.time_format.format_str());
|
||||||
time = format!("{}", utc.format_with_items(StrftimeItems::new(&fmt))).replace(&date, "");
|
time = format!("{}", utc.format_with_items(StrftimeItems::new(&fmt))).replace(&date, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user