UNPKG

timescape

Version:

A flexible, headless date and time input library for JavaScript. Provides tools for building fully customizable date and time input fields, with support for libraries like React, Preact, Vue, Svelte and Solid.

47 lines (44 loc) 1.76 kB
import * as solid_js_store from 'solid-js/store'; import * as react from 'react'; import TimescapeManager, { Options, DateType, RangeOptions } from './index.js'; export { $NOW } from './index.js'; declare const useTimescape: (options?: Options) => { readonly _manager: TimescapeManager; readonly getInputProps: (type: DateType) => { ref: (element: HTMLInputElement | null) => HTMLInputElement | null | undefined; }; readonly getRootProps: () => { ref: (element: HTMLElement | null) => void | null; }; readonly ampm: { readonly value: "am" | "pm" | undefined; set: (value: "am" | "pm") => void; toggle: () => void; getSelectProps: () => { value: "am" | "pm" | undefined; onChange: (e: Event | react.ChangeEvent<HTMLSelectElement>) => void; }; }; readonly update: solid_js_store.SetStoreFunction<Options>; readonly options: Options; }; declare const useTimescapeRange: (options?: RangeOptions) => { readonly getRootProps: () => { ref: (element: HTMLElement | null) => void; }; readonly from: { readonly getInputProps: (type: DateType) => { ref: (element: HTMLInputElement | null) => HTMLInputElement | null | undefined; }; readonly options: Options; readonly update: solid_js_store.SetStoreFunction<Options>; }; readonly to: { readonly getInputProps: (type: DateType) => { ref: (element: HTMLInputElement | null) => HTMLInputElement | null | undefined; }; readonly options: Options; readonly update: solid_js_store.SetStoreFunction<Options>; }; }; export { DateType, Options, RangeOptions, useTimescape, useTimescapeRange };