[yew-devel] [PATCH yew-comp] user panel: don't submit raw "expire" field

Shannon Sterz s.sterz at proxmox.com
Mon Dec 15 14:39:51 CET 2025


the api expects a unix timestamp here, but submitting the raw field
will submit a rfc3999 timestamp. this happens when a user has expire
set and is updated, but the expire field itself isn't changed. the ui
would then submit the raw expire field. to fix this, don't submit the
field by itself.

Signed-off-by: Shannon Sterz <s.sterz at proxmox.com>
---
 src/user_panel.rs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/user_panel.rs b/src/user_panel.rs
index f7af395..44d934f 100644
--- a/src/user_panel.rs
+++ b/src/user_panel.rs
@@ -532,7 +532,8 @@ fn add_user_input_panel(form_ctx: &FormContext) -> Html {
             tr!("Expire"),
             Field::new()
                 .name("expire")
-                .input_type(InputType::DatetimeLocal),
+                .input_type(InputType::DatetimeLocal)
+                .submit(false),
         )
         .with_field(tr!("Enabled"), Checkbox::new().name("enable").default(true))
         .with_right_field(tr!("First name"), Field::new().name("firstname"))
@@ -559,7 +560,8 @@ fn edit_user_input_panel(_form_ctx: &FormContext) -> Html {
             tr!("Expire"),
             Field::new()
                 .name("expire")
-                .input_type(InputType::DatetimeLocal),
+                .input_type(InputType::DatetimeLocal)
+                .submit(false),
         )
         .with_right_field(tr!("Last name"), Field::new().name("lastname"))
         .with_field(tr!("EMail"), Field::new().name("email"))
-- 
2.47.3





More information about the yew-devel mailing list