DatePicker
Pick or type an ISO calendar date with direct month/year navigation.
Live TypeScript example
Try the component here, then use the source below in your application.
- JavaScript
- 9.0 KiB
- Component CSS
- 2.0 KiB
- Shared theme CSS
- 3.8 KiBonce per application
How sizes are measured
The JavaScript figure includes this component’s required helpers. CSS includes its styling dependencies. Each entry is bundled separately for ES2022, minified, then compressed with gzip level 9. Your bundler may share helpers across components. Images, fonts, examples and application code are excluded.
Before compression: JavaScript 25.7 KiB; component CSS 8.0 KiB. These figures describe browser assets, not the complete package download.
View all component measurements →Type a date or open the calendar. Arrow keys move between dates; month and year selectors jump directly. Escape closes and restores focus.
import '@blukavantui/web/theme.css'
import {createDatePicker} from '@blukavantui/web/date-picker';
import '@blukavantui/web/date-picker.css';
export function mount(host:HTMLElement){
const output=document.createElement("p");output.setAttribute("role","status");host.append(output);
const picker=createDatePicker(host,{
"Value": "2026-10-13",
"Label": "Inspection date",
"IsDisabled": false,
"IsReadOnly": false,
"IsRequired": false,
"Placeholder": "",
"ShowClear": true,
"Min": "2026-01-01",
"Max": "2027-12-31",
"Locale": "en-US",
"DateFormat": "YYYY-MM-DD",
"FirstDayOfWeek": 1,
"ShowToday": true,
"ExtendedClass": "",
"DisabledDates": [
{
"Date": "2026-10-17"
}
]
}, {
Change:(value)=>{output.textContent=value||"Selection cleared";},
ValidationChanged:(valid,message)=>{if(!valid)output.textContent=message;},
});
return {destroy(){picker.destroy();output.remove();}};
}
const instance = mount(document.getElementById('example')!)
// When this page or framework component is removed:
// instance.destroy()
Install the library and add the host element
npm install https://blukavantui.blutekmedia.com/downloads/blukavantui-web-0.9.0.tgz<div id="example"></div>This example uses the downloadable @blukavantui/web package. Your application handles persistence and authentication through its typed callbacks. The starter ZIP includes this same example.
createDatePicker
Value, Min, Max and DisabledDates use YYYY-MM-DD. DateFormat changes typing/display only. Handle Change to retain the selected value. Empty is allowed unless IsRequired is true. The calendar uses the application locale for month and weekday names.
import { createDatePicker } from '@blukavantui/web/date-picker';
import '@blukavantui/web/date-picker.css';Load @blukavantui/web/theme.css once in your app shell.createDatePicker(host: HTMLElement, options?: DatePickerOptions, events?: PickerEvents)Reference for @blukavantui/web 0.9.0. Required and optional follow the shipped TypeScript declarations; optional does not imply a particular default. Pass typed arrays and objects directly where shown.
Options
15| Name | Type / requirement | Usage |
|---|---|---|
Value | stringOptional | YYYY-MM-DD for DatePicker, HH:mm for TimePicker, YYYY-MM-DDTHH:mm for DateTimePicker. Empty means no selection. |
Label | stringOptional | Visible input label and dialog name. |
IsDisabled | booleanOptional | Disables editing and opening. |
IsReadOnly | booleanOptional | Keeps values readable and selectable without editing. |
IsRequired | booleanOptional | Rejects an empty value after interaction. |
Placeholder | stringOptional | Optional input placeholder; does not replace the label. |
ShowClear | booleanOptional | Show an explicit Clear action. |
Min | stringOptional | Inclusive bounds, in the same stored format as Value. |
Max | stringOptional | Inclusive maximum ISO value. |
ExtendedClass | stringOptional | Additional classes on the component wrapper. |
Locale | stringOptional | BCP 47 locale for calendar month, weekday and date names. |
DateFormat | 'YYYY-MM-DD' | 'MM/DD/YYYY' | 'DD/MM/YYYY'Optional | Typed date format: YYYY-MM-DD, MM/DD/YYYY or DD/MM/YYYY. Stored dates remain ISO. |
FirstDayOfWeek | numberOptional | Sunday=0, Monday=1. Default 1. |
ShowToday | booleanOptional | Show the Today action. |
DisabledDates | BluDisabledDate[]Optional | Unavailable ISO calendar dates. Ranges cannot cross them. |
Callbacks
4| Name | Type / requirement | Usage |
|---|---|---|
Change | (value: string) => void | Promise<void>Optional | Reports Updated ISO value; empty when cleared. |
ValidationChanged | (isValid: boolean, message: string) => void | Promise<void>Optional | Reports Whether the current entered value is valid., Associated validation guidance. |
OpenChanged | (isOpen: boolean) => void | Promise<void>Optional | Reports Whether the selection dialog is open. |
Error | (message: string) => void | Promise<void>Optional | Reports Configuration or runtime error. |
Instance methods & properties
3| Name | Signature / type | Usage |
|---|---|---|
element | HTMLElement | Root owned by this instance. Dispose before removing its host. |
update | (patch: Partial<DatePickerOptions>) => void | Apply a partial options update to this instance. |
destroy | () => void | Dispose the instance and its listeners when the view is removed. |
Related data types
Expand a type for its fields and allowed values.
BluDisabledDate
Calendar date strings are YYYY-MM-DD; local date-times are YYYY-MM-DDTHH:mm.
interface BluDisabledDate {
Date: string;
}CalendarOptions
interface CalendarOptions {
Locale?: string;
DateFormat?: 'YYYY-MM-DD' | 'MM/DD/YYYY' | 'DD/MM/YYYY';
/** Sunday=0, Monday=1. Default 1. */
FirstDayOfWeek?: number;
ShowToday?: boolean;
DisabledDates?: BluDisabledDate[];
}Callback
type Callback<T extends unknown[] = []> = (...args: T) => void | Promise<void>;CommonOptions
interface CommonOptions {
ExtendedClass?: string;
}PickerOptions
interface PickerOptions extends CommonOptions {
Label?: string;
IsDisabled?: boolean;
IsReadOnly?: boolean;
IsRequired?: boolean;
Placeholder?: string;
ShowClear?: boolean;
/** Inclusive bounds, in the same stored format as Value. */
Min?: string;
Max?: string;
}Use these inputs, events, actions and structures in Service Studio. Names and data bindings are specific to the native Blocks.
Published in Community and Enterprise with live native showcase screens. Accessibility results and remaining review items are listed on the accessibility status page.
Included in the planned free BluKavantUI Community edition. The official OutSystems Forge release is coming soon. View Community scope →
@if(nativeUrl)@if(nativeUrl)Open OutSystems showcase ↗@endif@endif- Web runtime
- Supported
- TypeScript
- Supported
- OutSystems
- Supported
Statuses describe the component’s rendered code and interactions. Supply accessible content and follow the component guidance when integrating it.
Accessibility guidance → · Review evidence →Purpose and use
Pick or type an ISO calendar date with direct month/year navigation.
Keyboard design guidance
Click the field to open its anchored popup, or press Down Arrow to browse with the keyboard. Direct typing remains available. Calendar: arrows move by day/week, Home/End by week edge, Page Up/Down by month (Shift changes year). Escape cancels and returns focus to the field; clicking outside dismisses the popup. Time uses labelled Hour, Minute and AM/PM controls. Apply commits a range or time.
See the support status above for review coverage and any limitations.
In your application
Provide useful labels, preserve visible focus, and test the component with your actual content. Use text alongside status colors and check contrast in each state.
Events0No events yet.
Interact with an example to see its events.