B4X Store

ELEVATEUI · B4A · XUI

UICalendar

Inputs & forms component. Choose it when its specific APIs suit your screen.

78 modules 1,780 APIs

Inputs & forms

What it solves

Inputs & forms component. Choose it when its specific APIs suit your screen.

Animated conceptual demonstration, not an exact Android control screenshot.

21 methods3 Designer4 events

When to use this module

Let users choose a booking or due date, then pass the selection to an input field or a floating panel.

Before integrating, examine its methods, events and Designer options.

COMBINED EXAMPLE · 2 MODULES

Build a floating calendar

UIFloatingPanel supplies the floating surface while UICalendar handles date selection. Your form receives the chosen date without navigating to another screen.

Code follows verified ElevateUI v5 public signatures and events; compilation and on-device testing remain pending.

Conceptual preview
Select a dateâ–¾
M
T
W
T
F
S
S
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
18 Nov 2026
B4A integration — adaptation example
' Example for B4A Activity — ElevateUI v5
' Two independent modules: UIFloatingPanel + UICalendar
Sub Globals
    Private Floating As UIFloatingPanel
    Private Calendar As UICalendar
    Private OpenDate As Button
    Private SelectedDate As Label
End Sub

Sub Activity_Create(FirstTime As Boolean)
    OpenDate.Initialize("OpenDate")
    OpenDate.Text = "Choose date"
    Activity.AddView(OpenDate, 18dip, 24dip, 160dip, 48dip)

    SelectedDate.Initialize("")
    SelectedDate.Text = "No date selected"
    Activity.AddView(SelectedDate, 18dip, 82dip, 300dip, 40dip)

    Floating.Initialize(Me, "Floating", Activity)
    Floating.PanelSize(320dip, 320dip)

    Calendar.Initialize(Me, "Calendar")
    Calendar.AddToParent(Floating.Panel, 8dip, 8dip, 304dip, 304dip)
    Calendar.setSelectedDate(DateTime.Now)
End Sub

Private Sub OpenDate_Click
    Floating.Show(16dip, 132dip, 320dip, 320dip)
End Sub

Private Sub Calendar_SelectedDateChanged(Date As String)
    SelectedDate.Text = Date
    Floating.Close
End Sub

Private Sub Floating_Close
    Log("Floating calendar closed")
End Sub

B4A integration examples

Tutorials are based on existing project examples or audited APIs. Check each example’s prerequisites; B4A compilation is not claimed.

Use the calendar inside UIFloatingPanel
Reviewed integration tutorial Audited UIFloatingPanel/UICalendar public API Not B4A-compiled

See the complete popup construction in the related UIFloatingPanel reference; requires ElevateUI and XUI.

' Adapt after initializing UIFloatingPanel and UICalendar.
DateCalendar.AddToParent(DatePopup.Panel, 10dip, 10dip, 310dip, 345dip)
DateCalendar.setStartOnMonday(True)
DatePopup.Show(12dip, 80dip, 330dip, 385dip)

Private Sub DateCalendar_SelectedDateChanged(Date As String)
    Log("Selected: " & Date)
    DatePopup.Close
End Sub

Public methods reference

21 audited signatures

Public Sub Initialize (Callback As Object, EventName As String)

Prepare the instance before its other methods.

Callback As ObjectEventName As String
Public Sub SetLanguage(Language As String)

Public API declaration; refer to the library behavior for usage details.

Original catalog note: Verified against supplied 2026-11-28 .b4xlib

Language As String
Public Sub DesignerCreateView (Base As Object, Lbl As Label, Props As Map)

Invoked automatically by the B4A Visual Designer; do not call manually.

Original catalog note: Base type must be Object

Base As ObjectLbl As LabelProps As Map
Public Sub AddToParent(parent As B4XView, Left As Int, Top As Int, Width As Int, Height As Int)

Add this view to a parent container using the supplied bounds and options.

parent As B4XViewLeft As IntTop As IntWidth As IntHeight As Int
public Sub setOnlyTwoBorders(TowBorders As Boolean)

Public API declaration; refer to the library behavior for usage details.

Original catalog note: Verified against supplied 2026-11-28 .b4xlib

TowBorders As Boolean
Public Sub setStartOnMonday(StartOnMonday As Boolean)

Update start on monday at runtime when this setting changes.

Original catalog note: True=Week starts on Monday False=Week starts on Sunday

StartOnMonday As Boolean
public Sub setDate(date As Long)

Public API declaration; refer to the library behavior for usage details.

Original catalog note: Verified against supplied 2026-11-28 .b4xlib

date As Long
Public Sub setRedSunday(IsRed As Int)

Update red sunday at runtime when this setting changes.

Original catalog note: Set to 0 for Sunday days and header in black Set to 1 to turn red only the header of Sundays Set to 2 to turn red header and days for Sundays

IsRed As Int
Public Sub setRedSaturday(IsRed As Int)

Update red saturday at runtime when this setting changes.

Original catalog note: Set to 0 for Saturday days and header in black Set to 1 to turn red only the header of Saturdays Set to 2 to turn red header and days for Saturdays

IsRed As Int
Public Sub GetSelectedDate As String

Use GetSelectedDate for its named operation; follow its exact signature.

Original catalog note: Método para obtener la fecha seleccionada en formato de texto

Returns: String

Public Sub GetSelectedDateInMillis As Long

Use GetSelectedDateInMillis for its named operation; follow its exact signature.

Original catalog note: Método para obtener la fecha seleccionada en formato Long

Returns: Long

Public Sub setSelectedDate(dateMillis As Long)

Update selected date at runtime when this setting changes.

dateMillis As Long
public Sub setCalendarColor(color As Int)

Public API declaration; refer to the library behavior for usage details.

Original catalog note: Verified against supplied 2026-11-28 .b4xlib

color As Int
public Sub setSelectColor(color As Int)

Public API declaration; refer to the library behavior for usage details.

Original catalog note: Verified against supplied 2026-11-28 .b4xlib

color As Int
Public Sub SetSelectedRange(StartDate As Long, EndDate As Long)

Use SetSelectedRange for its named operation; follow its exact signature.

Original catalog note: Sets the selected range/period. Pass 0 to clear.

StartDate As LongEndDate As Long
Public Sub GetStartDate As Long

Use GetStartDate for its named operation; follow its exact signature.

Original catalog note: Gets the selected start date in ticks (0 if not selected)

Returns: Long

Public Sub GetEndDate As Long

Use GetEndDate for its named operation; follow its exact signature.

Original catalog note: Gets the selected end date in ticks (0 if not selected)

Returns: Long

Public Sub GetStartDateString As String

Use GetStartDateString for its named operation; follow its exact signature.

Original catalog note: Gets the selected start date as a formatted string (format depends on DateTime.DateFormat)

Returns: String

Public Sub GetEndDateString As String

Use GetEndDateString for its named operation; follow its exact signature.

Original catalog note: Gets the selected end date as a formatted string (format depends on DateTime.DateFormat)

Returns: String

Public Sub setRangeSelectionMode(Enabled As Boolean)

Update range selection mode at runtime when this setting changes.

Original catalog note: Enables or disables range selection mode

Enabled As Boolean
Public Sub getRangeSelectionMode As Boolean

Read the current range selection mode value for validation or UI synchronization.

Returns: Boolean

Designer · 3

#DesignerProperty: Key: SelectedDateColor, DisplayName: Selected Date Color, FieldType: Color, DefaultValue: 0xFF1E78FF#DesignerProperty: Key: BackgroundColor, DisplayName: Calendar Color, FieldType: Color, DefaultValue: 0xFFF8FAFD#DesignerProperty: Key: RangeSelectionMode, DisplayName: Range Selection Mode, FieldType: Boolean, DefaultValue: False

Public events and how to implement them · 4

Initialize with Me and the event prefix Demo, then add the following handler to your B4A module. Names and arguments come from the library declaration.

SelectedDateChanged(Date As String)

Raised when a selection or value changes; use it to update dependent data.

B4A handler signature with Demo prefix

Private Sub Demo_SelectedDateChanged(Date As String)
    Log("SelectedDateChanged")
End Sub
SelectedDateChanged2(Date As Long)

Raised when a selection or value changes; use it to update dependent data.

B4A handler signature with Demo prefix

Private Sub Demo_SelectedDateChanged2(Date As Long)
    Log("SelectedDateChanged2")
End Sub
SelectedRangeChanged(StartDate As String, EndDate As String)

Raised when a selection or value changes; use it to update dependent data.

B4A handler signature with Demo prefix

Private Sub Demo_SelectedRangeChanged(StartDate As String, EndDate As String)
    Log("SelectedRangeChanged")
End Sub
SelectedRangeChanged2(StartDate As Long, EndDate As Long)

Raised when a selection or value changes; use it to update dependent data.

B4A handler signature with Demo prefix

Private Sub Demo_SelectedRangeChanged2(StartDate As Long, EndDate As Long)
    Log("SelectedRangeChanged2")
End Sub

For code-created controls use Initialize(Me, "Demo") when that signature exists; for Designer controls set the event name there. Replace Demo with the actual prefix.

Public fields, constants and types

Public mBase As B4XViewPublic Tag As Object
Source: ElevateUI public API catalog; tutorials cross-checked against ElevateUI(6).b4xlib. Visualizations are illustrative; sample code requires B4A compilation.