The Flatpickr block is a Reactive Web date, time and range picker built on flatpickr v4.6.13. It covers every capability on the flatpickr examples page through block parameters, so no JavaScript is needed in your app.
What
Count
Where
Block parameters
39
Block Flatpickr
Flatpickr
Events
5
Public client actions
8
Module Flatpickr_Pat
Flatpickr_Pat
Plugins
7
Built in, enabled with Plugins
Locales
65
Built in, chosen with Locale
Locale
Themes
Chosen with Theme
Theme
Everything ships inside the module, including locales, plugins and themes, so the picker works without internet access. The FlatpickrDemo app shows every feature on a live card.
A working picker takes four steps and no code.
Flatpickr_*
Mode
"range"
AltFormat
"M j, Y"
"default"
StartDate
EndDate
DateList
The value the picker stores is always Y-m-d (or Y-m-d H:i:S with time), so it converts cleanly to OutSystems dates. AltFormat only changes what the user sees.
Y-m-d
Y-m-d H:i:S
All 39 parameters are optional. Text values that take lists accept a comma separated list or a JSON array.
Parameter
Type
Default
What it does
Text
"single"
"single", "multiple" or "range"
Display format, e.g. "F j, Y". The stored value stays Y-m-d
MinDate
Date
Earliest selectable date
MaxDate
Latest selectable date
DefaultDate
Preloaded date(s): "today", "2026-10-27", "2026-10-27 13:45", a list or JSON array. Use 2 dates in range mode
DisableDates
Dates that can't be picked: list or JSON array of dates and {"from", "to"} ranges
EnableDates
Only these dates can be picked. Same format as DisableDates
DisableWeekDays
Week days that can't be picked, 0 = Sunday to 6 = Saturday, e.g. "0,6"
EnableTime
Boolean
False
Adds a time picker
EnableSeconds
Adds seconds to the time picker
NoCalendar
Time picker only (implies EnableTime)
Time24hr
24-hour clock, no AM/PM
MinTime
Earliest time, e.g. "09:00"
MaxTime
Latest time, e.g. "17:30"
DefaultHour
Integer
12
Initial hour
DefaultMinute
0
Initial minute
HourIncrement
1
Hour step
MinuteIncrement
Minute step
WeekNumbers
Shows ISO week numbers
Inline
Calendar always visible below the input
ShowMonths
Months shown side by side
MonthSelectorType
"dropdown"
"dropdown" or "static"
ShorthandCurrentMonth
Jan instead of January
Position
"auto"
auto, above or below, optionally + left, center or right
Static
Calendar inside the input wrapper; use in popups and modals
Language code, see Localization
FirstDayOfWeek
-1
0 = Sunday to 6 = Saturday; -1 uses the locale
"dark"
See Themes. Applies to every picker on the page
AllowInput
User can type a date
ClickOpens
True
False = open only with Flatpickr_Open
DisableMobile
Use flatpickr instead of the native picker on phones
Conjunction
", "
Separator in multiple mode
Comma separated plugin names, see Plugins
PluginOptions
JSON object with options per plugin
RangeSecondInputId
Id of a second input for the range plugin
AdvancedOptions
JSON object with any other flatpickr option, applied last
Placeholder
Input placeholder
IsDisabled
Disables the input
ExtendedClass
Extra CSS classes on the input
All five events are optional.
Event
Parameters
When it fires
SelectedDates
StartDate, EndDate (Date Time), DateList (Date Time List)
The selection changes. StartDate and EndDate are the first and last selected dates, or NullDate when cleared
Initialized
WidgetId (Text)
The picker is created, and again after a parameter change. Store WidgetId for the client actions
Opened
The calendar opens
Closed
The calendar closes
MonthYearChanged
Month (Integer, 1–12), Year (Integer)
The shown month or year changes
In range mode, SelectedDates also fires after the first click, with one date. Check DateList.Length = 2 before treating the range as complete.
DateList.Length = 2
The client actions control a picker from anywhere on the screen. Each one takes the WidgetId that the Initialized event returns.
WidgetId
PickerId
PickerId = WidgetId
WidgetId = PickerId
Action
Flatpickr_Open
Opens the calendar
Flatpickr_Close
Closes the calendar
Flatpickr_Toggle
Opens or closes the calendar
Flatpickr_Clear
WidgetId, TriggerChange (default True)
Clears the selection
Flatpickr_SetDate
WidgetId, Dates, TriggerChange (default True)
Selects date(s): "today", "2026-10-27", a list or JSON array
Flatpickr_JumpToDate
WidgetId, Date
Shows a month without selecting, e.g. "2026-12-01"
Flatpickr_ChangeMonth
WidgetId, Month, IsOffset (default True)
Moves by Month months, or to month index 0–11 when IsOffset = False
Flatpickr_SetOption
WidgetId, Option, Value
Changes one flatpickr option at runtime, e.g. Option = "maxDate", Value = "2026-12-31". JSON values are parsed
With TriggerChange = True, the SelectedDates event fires after the change.
Turn plugins on with Plugins (comma separated) and configure them with PluginOptions, a JSON object keyed by plugin name.
Plugin
Typical settings
range
Start date in the picker, end date in a second input
RangeSecondInputId = the second input's Id. Empty = the plugin creates one
confirmDate
Adds a confirm button
{"confirmDate": {"confirmText": "Done ", "showAlways": false}}
weekSelect
Selects a whole week
AltFormat = "\W\e\e\k #W, Y" shows "Week #44, 2026"
"\W\e\e\k #W, Y"
monthSelect
Picks a month instead of a day
{"monthSelect": {"shorthand": true, "dateFormat": "Y-m-d", "altFormat": "F Y"}} with AltFormat = "F Y"
{"monthSelect": {"shorthand": true, "dateFormat": "Y-m-d", "altFormat": "F Y"}}
"F Y"
minMaxTime
Different time limits per day
{"minMaxTime": {"table": {"2026-10-27": {"minTime": "16:00", "maxTime": "22:00"}}}}. Other days use MinTime and MaxTime
{"minMaxTime": {"table": {"2026-10-27": {"minTime": "16:00", "maxTime": "22:00"}}}}
scroll
Mouse wheel changes month, year and time
none
label
Keeps <label for> working when AltFormat is used
<label for>
Keep dateFormat as "Y-m-d" in monthSelect options, so the value still converts to an OutSystems date. In OutSystems expressions, write each " inside a text literal as "".
dateFormat
"Y-m-d"
"
""
Locale sets month names, weekdays and the first day of the week. The 65 built-in codes are:
default (English), ar, at, az, be, bg, bn, bs, ca, cat, ckb, cs, cy, da, de, en, eo, es, et, fa, fi, fo, fr, gr, he, hi, hr, hu, hy, id, is, it, ja, ka, km, ko, kz, lt, lv, mk, mn, ms, my, nl, nn, no, pa, pl, pt, ro, ru, si, sk, sl, sq, sr, sv, th, tr, uk, uz, uz_latn, vn, zh, zh_tw.
default
ar
at
az
be
bg
bn
bs
ca
cat
ckb
cs
cy
da
de
en
eo
es
et
fa
fi
fo
fr
gr
he
hi
hr
hu
hy
id
is
it
ja
ka
km
ko
kz
lt
lv
mk
mn
ms
my
nl
nn
no
pa
pl
pt
ro
ru
si
sk
sl
sq
sr
sv
th
tr
uk
uz
uz_latn
vn
zh
zh_tw
An unknown code falls back to English. FirstDayOfWeek overrides the locale's first day.
Theme loads one stylesheet for the whole page: default (light), dark, material_blue, material_green, material_red, material_orange, airbnb, confetti.
dark
material_blue
material_green
material_red
material_orange
airbnb
confetti
.flatpickr-calendar
Each row is a working setup from the FlatpickrDemo app. Values are written as OutSystems expressions.
Goal
Readable date
AltFormat = "F j, Y"
Date and time, 12-hour
EnableTime = True, AltFormat = "F j, Y h:i K"
Time only, office hours
NoCalendar = True, Time24hr = True, MinTime = "09:00", MaxTime = "18:00", MinuteIncrement = 15
Start on today
DefaultDate = "today"
Range for the next 7 days
Mode = "range", DefaultDate = DateToText(CurrDate()) + "," + DateToText(AddDays(CurrDate(), 6))
Two months, inline
Mode = "range", ShowMonths = 2, Inline = True
Next 30 days only
MinDate = CurrDate(), MaxDate = AddDays(CurrDate(), 30)
No weekends
DisableWeekDays = "0,6"
Block a holiday range
DisableDates = "[{""from"": ""2026-12-24"", ""to"": ""2026-12-31""}]"
Several dates with a custom separator
Mode = "multiple", Conjunction = " | "
French, Monday first
Locale = "fr", FirstDayOfWeek = 1
Typing allowed
AllowInput = True, Placeholder = "Type a date (Y-m-d)"
Inside a popup
Static = True
Open only from a button
ClickOpens = False, then call Flatpickr_Open
Stay open after picking
AdvancedOptions = "{""closeOnSelect"": false}"
Upgrading from the previous version
How it behaves
Problem
Fix
A JSON parameter has no effect
The browser console shows "[Flatpickr] Invalid JSON in ...". Check the doubled quotes in the expression
Locale stays English
The code isn't in the Localization list. Codes are lowercase
Client action does nothing
WidgetId is empty. Assign it in the Initialized handler before calling
Theme changes on other pickers
Expected: the theme is page-wide. Use one Theme per page
Range shows only one date
The user picked one date so far. Wait for DateList.Length = 2
--Will be update--
((Will update for documentation)