Fix broken set status form in Safari and Firefox

What does this MR do and why?

Related to #389484 (closed)

Currently we are passing user.status.clear_status_at to the frontend in the default Rails date/time format (not sure where this is defined?) which is 2023-01-28 17:38:09 UTC. Safari and Firefox does not support parsing this format and therefore throws an error. This MR passes user.status.clear_status_at in the iso8601 format which all browser support parsing.

Screenshots or screen recordings

Modal

Before After
Screenshot_2023-01-27_at_9.57.13_AM Screenshot_2023-01-27_at_9.57.59_AM

Edit profile

Before After
Screenshot_2023-01-27_at_10.00.24_AM Screenshot_2023-01-27_at_9.59.25_AM

How to set up and validate locally

Using Safari

Modal

  1. Click your avatar in the upper right corner
  2. Click Set status
  3. Fill out the form and select a value from Clear status after
  4. Click your avatar in the upper right corner
  5. Click Edit status
  6. The form should render and work

Edit profile

  1. Go to /-/profile
  2. Fill out the Current status form and select a value for Clear status after
  3. Save the form
  4. The form should render and work

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Hegman

Merge request reports

Loading