vira
Version:
A simple and highly versatile design system using element-vir.
48 lines (47 loc) • 2.08 kB
TypeScript
import { type PartialWithUndefined } from '@augment-vir/common';
import { type FullDate } from 'date-vir';
/**
* A native date picker input that emits `FullDate` values. Fires `valueChange` whenever the user
* selects (or clears) a date.
*
* @category Input
* @category Elements
* @see https://electrovir.github.io/vira/book/elements/vira-date-input
*/
export declare const ViraDateInput: import("element-vir").DeclarativeElementDefinition<"vira-date-input", {
value: FullDate | undefined;
} & PartialWithUndefined<{
/** Lower bound for selectable dates. Defaults to `1800-01-01` when omitted. */
min: FullDate;
/** Upper bound for selectable dates. Defaults to 10 years from now when omitted. */
max: FullDate;
/** If true, applies error styling. */
hasError: boolean;
/** A label that is shown above the input, if provided. */
label: string;
/** If true, the input is disabled and cannot be edited. */
isDisabled: boolean;
/** If true, the current value is rendered as plain text instead of an editable input. */
isReadonly: boolean;
/** Timezone used to interpret the selected date. Defaults to the user's timezone. */
timezone: string;
/** Only show the date part of the selected date when in readonly mode. */
showDateOnly: boolean;
/** Only show the time part of the selected date when in readonly mode. */
showTimeOnly: boolean;
}>, {
/** Used to couple the label and input together. Not applied when no label is provided. */
randomId: string;
}, {
/** Fires whenever the user selects or clears a date. */
valueChange: import("element-vir").DefineEvent<{
hour: import("date-vir").Hour;
minute: import("date-vir").Minute;
millisecond: number;
year: number;
month: import("date-vir").MonthNumber;
day: import("date-vir").DayOfMonth;
second: import("date-vir").Second;
timezone: string;
} | undefined>;
}, "vira-date-input-error" | "vira-date-input-disabled", "vira-date-input-", readonly [], readonly []>;