about summary refs log tree commit diff
path: root/app/javascript/styles
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-10-28 12:56:32 +0200
committerGitHub <noreply@github.com>2022-10-28 12:56:32 +0200
commitd9d722d74b2cb9bf30fa4cc98af6ddbeca003ebc (patch)
tree54827827ec434c98ce2991431bd50ecaffcb115f /app/javascript/styles
parent10922294ffd2c83e155f020896318d16f3764e8d (diff)
Change admin announcement edition interface to use datetime-local (#18321)
* Change admin announcement edition interface to use datetime-local

* Dynamically set announcement stop date as required if start date is set, set minimum date for stop date

* Change `all_day` to not be bound to presence of time-range

* Add pattern and placeholder as minimal fallback for browsers not supporting datetime-local

* Display datetime-local inputs as local time

Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
Diffstat (limited to 'app/javascript/styles')
-rw-r--r--app/javascript/styles/mastodon/forms.scss5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/javascript/styles/mastodon/forms.scss b/app/javascript/styles/mastodon/forms.scss
index 25c9c9fe5..a3ddc7636 100644
--- a/app/javascript/styles/mastodon/forms.scss
+++ b/app/javascript/styles/mastodon/forms.scss
@@ -405,6 +405,7 @@ code {
   input[type="email"],
   input[type="password"],
   input[type="url"],
+  input[type="datetime-local"],
   textarea {
     box-sizing: border-box;
     font-size: 16px;
@@ -445,7 +446,8 @@ code {
   input[type="text"],
   input[type="number"],
   input[type="email"],
-  input[type="password"] {
+  input[type="password"],
+  input[type="datetime-local"] {
     &:focus:invalid:not(:placeholder-shown),
     &:required:invalid:not(:placeholder-shown) {
       border-color: lighten($error-red, 12%);
@@ -461,6 +463,7 @@ code {
     input[type="number"],
     input[type="email"],
     input[type="password"],
+    input[type="datetime-local"],
     textarea,
     select {
       border-color: lighten($error-red, 12%);