Range mode with optional separate start/end times and custom output formatting.
Basic range
First click starts a range, second completes it. Use onRangeChange for updates.
dateFlow(input, {
mode: "range",
range: {
start: new Date(2026, 3, 5),
end: new Date(2026, 3, 18),
},
outputFormat: "yyyy-MM-dd",
});
Range + reset button
showResetButton adds a header icon that clears the range and closes the picker.
dateFlow(input, {
mode: "range",
showResetButton: true,
resetInputLabel: "Reset",
range: {
start: new Date(2026, 3, 5),
end: new Date(2026, 3, 18),
},
outputFormat: "yyyy-MM-dd",
});
Range with start & end time
Separate time controls under each calendar pane in range mode.
dateFlow(input, {
mode: "range",
showTime: true,
range: {
start: new Date(2026, 3, 10, 9, 30),
end: new Date(2026, 3, 14, 17, 45),
},
outputFormat: "yyyy-MM-dd HH:mm",
});
Range separator & format
rangeOutputSeparator and outputFormat shape the value input string.
dateFlow(input, {
mode: "range",
showTime: true,
outputFormat: "dd.MM.yyyy HH:mm",
rangeOutputSeparator: " → ",
range: {
start: new Date(2026, 8, 1, 8, 0),
end: new Date(2026, 8, 7, 20, 0),
},
});
Range + week numbers
Combine range mode with ISO week column.
dateFlow(input, {
mode: "range",
showWeekNumbers: true,
locale: { weekNumberHeader: "KW" },
range: {
start: new Date(2026, 0, 6),
end: new Date(2026, 0, 20),
},
});
Range + dark theme
theme: "dark" sets data-cal-theme on the calendar root.
dateFlow(input, {
mode: "range",
theme: "dark",
range: {
start: new Date(2026, 4, 12),
end: new Date(2026, 4, 26),
},
});
Range presets
Shortcut list for common ranges. Click a preset to preselect dates; Apply commits. Hidden on mobile (≤899px).
dateFlow(input, {
mode: "range",
showTime: true,
rangePresets: {
position: "left",
presets: [
{
caption: "Next 7 Days",
start: new Date(2026, 5, 18),
end: new Date(2026, 5, 24),
},
{
caption: "Last Month",
start: new Date(2026, 4, 18),
end: new Date(2026, 5, 18),
},
],
},
});
Range presets — right
Set rangePresets.position to "right" to place the shortcut list on the right.
dateFlow(input, {
mode: "range",
rangePresets: {
position: "right",
presets: [/* … */],
},
});