Difference between revisions of "UI.Calendar"
From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2023.1<br/> '''Class:''' UI<br/> === Description === Creates Calendar widgets. The widget can be a '''Calendar''' or a '''DatePic...") |
(No difference)
|
Revision as of 02:17, 15 October 2023
Available since: Gideros 2023.1
Class: UI
Description
Creates Calendar widgets. The widget can be a Calendar or a DatePicker.
UI.Calendar.new()
Example
A Calendar
local gui = UI.Calendar.new()
gui:setPosition(50, 50)
stage:addChild(gui)
--local myday = os.time()
local myday = os.time({year=2003, month=7, day=14, hour=8, min=10, sec=0,})
gui:setDate(myday)
local mydate = os.date("*t", gui:getDate())
print(mydate.month)
print(gui.month) -- shorter
A DatePicker
local gui = UI.DatePicker.new()
gui:setPosition(50, 50)
gui:setDate(os.time({year=2003, month=8, day=14, hour=8, min=10, sec=0,}))
print(gui:getDate())
local screen=UI.Screen.new() -- needed to add the calendar
screen:ui(gui)