Add support for datetime-local to forms
This commit is contained in:
@@ -595,7 +595,8 @@ input[type="text"],
|
||||
input[type="password"],
|
||||
input[type="email"],
|
||||
input[type="number"],
|
||||
input[type="date"] {
|
||||
input[type="date"],
|
||||
input[type="datetime-local"] {
|
||||
display: inline-block;
|
||||
margin: 3px;
|
||||
/* Same as button, to make them align nicely */
|
||||
@@ -617,12 +618,14 @@ input[type="password"]:active,
|
||||
input[type="email"]:active,
|
||||
input[type="number"]:active,
|
||||
input[type="date"]:active,
|
||||
input[type="datetime-local"]:active,
|
||||
textarea:focus,
|
||||
input[type="text"]:focus,
|
||||
input[type="password"]:focus,
|
||||
input[type="email"]:focus,
|
||||
input[type="number"]:focus,
|
||||
input[type="date"]:focus {
|
||||
input[type="date"]:focus,
|
||||
input[type="datetime-local"]:focus {
|
||||
box-shadow: inset 0 0 3px 0 var(--highlight_color);
|
||||
}
|
||||
|
||||
@@ -631,7 +634,8 @@ input[type="text"]:disabled,
|
||||
input[type="password"]:disabled,
|
||||
input[type="email"]:disabled,
|
||||
input[type="number"]:disabled,
|
||||
input[type="date"]:disabled {
|
||||
input[type="date"]:disabled,
|
||||
input[type="datetime-local"]:disabled {
|
||||
color: var(--input_disabled_text);
|
||||
box-shadow: none;
|
||||
transition: none;
|
||||
|
@@ -166,6 +166,13 @@ let handle_errors = (response) => {
|
||||
type="number"
|
||||
step="0.1"
|
||||
class="form_input"/>
|
||||
{:else if field.type === "datetime-local"}
|
||||
<input bind:this={field.binding}
|
||||
id="input_{field.name}"
|
||||
name="{field.name}"
|
||||
value="{field.default_value}"
|
||||
type="datetime-local"
|
||||
class="form_input"/>
|
||||
{:else if field.type === "username"}
|
||||
<input bind:this={field.binding}
|
||||
id="input_{field.name}"
|
||||
|
Reference in New Issue
Block a user