Calendar.selected readwrite


Get or set the current selected date on the Calendar. The selected date is a Datetime value.

When the Calendar widget is created, the default selected date is the current day.

Example

--! luart-extensions import ui -- create a simple Window local win = ui.Window("Calendar.selected sample", 320, 210) local calendar = ui.Calendar(win, 50, 14) function calendar:onSelect(date) win:status("Selected date : "..date:format("dddd dd/MM/yyyy"):capitalize()) end calendar:onSelect(calendar.selected) win:show() -- update the user interface until the user closes the Window repeat ui.update() until not win.visible