From a413746c05dbcbb6534d98f0231cd8524a8af983 Mon Sep 17 00:00:00 2001 From: Richard Shiue <71320345+richardshiue@users.noreply.github.com> Date: Sat, 17 Sep 2022 19:49:13 +0800 Subject: [PATCH] fix: immediately show or hide time when includeTime changes --- .../field/type_options/date_type_option/date_type_option.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/rust-lib/flowy-grid/src/services/field/type_options/date_type_option/date_type_option.rs b/frontend/rust-lib/flowy-grid/src/services/field/type_options/date_type_option/date_type_option.rs index e4ac22f299..eaf6764378 100644 --- a/frontend/rust-lib/flowy-grid/src/services/field/type_options/date_type_option/date_type_option.rs +++ b/frontend/rust-lib/flowy-grid/src/services/field/type_options/date_type_option/date_type_option.rs @@ -51,7 +51,7 @@ impl DateTypeOptionPB { let date = format!("{}", utc.format_with_items(StrftimeItems::new(fmt))); let mut time = "".to_string(); - if has_time { + if has_time && self.include_time { let fmt = format!("{} {}", self.date_format.format_str(), self.time_format.format_str()); time = format!("{}", utc.format_with_items(StrftimeItems::new(&fmt))).replace(&date, ""); }