Skip to main content

Date

Basic

Let's say you want to create a simple Date. So let's take an example how you do it, check it out below.

create a file at app/user/page.tsx

app/user/page.tsx
<AFormInput
name={'dob'}
type={'date'}
defaultValue={'06-01-2023'}
onChange={(value) => onInputChange(value)}
onBlur={false}
disabled={false}
/>

The above code will render Date like this.

Basic TextInput

Props

NameTypeRequiredDescription
namestringYesname of the input.
disabledboolean'NoA disabled input element is unusable and un-clickable.
readonlybooleanNoit specifies that an input field is read-only. A read-only input field cannot be modified (however, a user can tab to it, highlight it, and copy the text from it).
defaultValuestringNoThe attribute have some defalut value

Events

NameTypeRequiredDescription
onChange(value: string) => voidNoThe onchange event occurs when the value of an HTML element is changed.
onBlur() => voidNoThe onblur event occurs when an HTML element loses focus. The onblur event is often used on input fields. The onblur event is often used with form validation (when the user leaves a form field).