Certain props are shared across all form-related components, and you can find them in the form wrapper.
By using the class prop, you can apply custom classes or Tailwind CSS classes to customize the appearance and behavior of the gallery, allowing for flexible design changes.
Date Time component
The date-time component is a built-in browser feature that provides a user-friendly date picker for selecting dates, times, or a combination of both. This component allows users to easily input date and time values without manually typing them, reducing errors and improving the overall user experience. When implemented using input types like
date
,
time
, or
datetime-local
, the browser automatically renders a native date or time picker. This simplifies form interactions and ensures consistent behavior across different devices and platforms, as it leverages the browser's built-in functionality for date and time selection.
<.date_time_field />
Date Time type-prop
The
type
attribute is a string that determines the specific type of input field, allowing you to choose from options like
date
,
datetime-local
,
time
,
week
, and
month
. By setting the
type
attribute, you can customize the input to handle various types of data, such as selecting a specific date, time, or week. The default is
date
, but changing this attribute allows for more flexibility in capturing different types of time-related data from users, enhancing form functionality and user experience.
<!--Date is default type--> <.date_time_field type="date" /> <.date_time_field type="datetime-local" /> <.date_time_field type="time" /> <.date_time_field type="week" /> <.date_time_field type="month" />