mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Fix: Clear Datetime Attribute
This commit is contained in:
1 parent
e965738987
commit
6c0683f403
1 file changed
+8
-2
@@ -6,7 +6,7 @@
|
||||
export let showLabel = true;
|
||||
export let optionalText: string | undefined = undefined;
|
||||
export let id: string;
|
||||
export let value = '';
|
||||
export let value: string;
|
||||
export let required = false;
|
||||
export let disabled = false;
|
||||
export let readonly = false;
|
||||
@@ -33,6 +33,11 @@
|
||||
error = element.validationMessage;
|
||||
}
|
||||
|
||||
function handleInput(event: Event) {
|
||||
const { value: currentValue } = event.currentTarget as HTMLInputElement;
|
||||
value = currentValue || null;
|
||||
}
|
||||
|
||||
$: if (value) {
|
||||
error = null;
|
||||
}
|
||||
@@ -49,12 +54,13 @@
|
||||
{disabled}
|
||||
{readonly}
|
||||
{required}
|
||||
{value}
|
||||
step=".001"
|
||||
autocomplete={autocomplete ? 'on' : 'off'}
|
||||
type="datetime-local"
|
||||
class="input-text"
|
||||
bind:value
|
||||
bind:this={element}
|
||||
on:input={handleInput}
|
||||
on:invalid={handleInvalid} />
|
||||
</div>
|
||||
{#if error}
|
||||
|
||||
Reference in new issue
Block a user