Public Sub Initialize (Callback As Object, EventName As String)
Prepare the instance before its other methods.
ELEVATEUI · B4A · XUI
Inputs & forms component. Choose it when its specific APIs suit your screen.
Inputs & forms
Inputs & forms component. Choose it when its specific APIs suit your screen.
Animated conceptual demonstration, not an exact Android control screenshot.
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
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.
' 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
Tutorials are based on existing project examples or audited APIs. Check each example’s prerequisites; B4A compilation is not claimed.
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
21 audited signatures
Public Sub Initialize (Callback As Object, EventName As String)
Prepare the instance before its other methods.
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
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
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.
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
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
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
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
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
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.
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
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
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.
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
Public Sub getRangeSelectionMode As Boolean
Read the current range selection mode value for validation or UI synchronization.
Returns: Boolean
#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: FalseInitialize with Me and the event prefix Demo, then add the following handler to your B4A module. Names and arguments come from the library declaration.
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
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
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
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 mBase As B4XViewPublic Tag As Object