Date time field

v0.0.10

v0.0.10StableComponentStatelessApache-2.0
Installation mix mishka.ui.gen.component date_time_field
Source View Source

Date Time component

Date Time component

Choose a date

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 component

heex
<.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 Time type-prop

heex
<!--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" />