components
Input Date
v.1.0.0 | SaturnField that help users navigate dates, selecting specific date.
<InputDate variant="DEFAULT" rightIcon={{ icon: 'ICON_PLACEHOLDER' }} label={{ content: 'Label' }} placeholder="Placeholder" format="DD-MM-YYYY" locale="en-EN" maxDate={getCurrentDate()} minDate={getCurrentDate('01-01-2000')} today="Today, "
The inputDate component inherits its properties of the input component. For more information visit the Input documentation.
Variant
In Kubit Design System, users have the freedom to generate variants for each component according to their needs. While predefined variants are provided as examples, they can be modified or new ones can be added to align with the specific requirements of each project.
We have set this predefine style for its quick use, access them through the variant prop:
<InputDate variant="DEFAULT" rightIcon={{ icon: 'ICON_PLACEHOLDER' }} label={{ content: 'Label' }} placeholder="Placeholder" format="DD-MM-YYYY" locale="en-EN" maxDate={getCurrentDate()} minDate={getCurrentDate('01-01-2000')} defaultDate={getCurrentDate()}
Range
When a date range is needed the hasRange prop must be set to TRUE . The default dateSeparator between initialDate and initialSecondDate is to.
<InputDate variant="DEFAULT" rightIcon={{ icon: 'ICON_PLACEHOLDER' }} label={{ content: 'Label' }} placeholder="Placeholder" format="DD-MM-YYYY" locale="en-EN" maxDate={getCurrentDate()} minDate={getCurrentDate('01-01-2000')} today="Today, "
Weekdays Format
Inside calendar prop, you can add formatWeekDayOption key to set the format of the weekdays. The default value is narrow.
<InputDate variant="DEFAULT" rightIcon={{ icon: 'ICON_PLACEHOLDER' }} label={{ content: 'Label' }} placeholder="Placeholder" format="DD-MM-YYYY" locale="en-EN" maxDate={getCurrentDate()} minDate={getCurrentDate('01-01-2000')} today="Today, "
Sunday First Day
Inside calendar prop, you can add sundayFirst key to set Sunday as the first day of the week. The default value is false.
<InputDate variant="DEFAULT" rightIcon={{ icon: 'ICON_PLACEHOLDER' }} label={{ content: 'Label' }} placeholder="Placeholder" format="DD-MM-YYYY" locale="en-EN" maxDate={getCurrentDate()} minDate={getCurrentDate('01-01-2000')} today="Today, "