Calendar (캘린더) Widget Control
This page lists the Widget Control (Property · Method · Event) you use to control the Calendar widget from a script. For an introduction to the widget and how to use it, visit Calendar.
In the examples below, calendarID is the name (ID) you assigned to the Calendar widget on the canvas. In a script, you access members as widgetID.member.
Widget Control summary
| Widget Control | Kind | Signature | Description |
|---|---|---|---|
selectedDate | Property (read-only) | calendarID.selectedDate | Returns the currently selected date as a yyyyMMdd string |
eventDate | Property (write-only) | calendarID.eventDate = [...] | Sets the list of dates to mark with an event dot |
goToDay | Method | calendarID.goToDay(date) | Moves to the date you pass |
goToToday | Method | calendarID.goToToday() | Moves to today |
expand | Method | calendarID.expand() | Expands to the full month view |
collapse | Method (Deprecated) | calendarID.collapse() | Collapses to the week view (deprecated) |
onPageChanged | Event | onPageChanged = (date) => { ... } | Runs when the visible month (page) changes |
onDateSelected | Event | onDateSelected = (date) => { ... } | Runs when a date is selected |
Property
selectedDate
Returns the currently selected date as a yyyyMMdd string. When no date is selected, it returns an empty string ('').
- Kind: Property (read-only)
- Type:
string(yyyyMMddformat)
Example
const date = calendarID.selectedDate; // e.g. "20260622" or ""
eventDate
Sets the list of dates to mark with an event dot on the calendar. Each date must be a yyyyMMdd string.
- Kind: Property (write-only)
- Type: array of strings (
string[], each element inyyyyMMddformat)
Example
calendarID.eventDate = ["20260622", "20260625"];
Method
goToDay(date)
Moves the calendar to the date you pass. If the value can't be parsed as a date, nothing happens.
- Parameters:
date- the date to move to (yyyyMMddstring) - Returns: None (
void)
Example
calendarID.goToDay("20260622");
goToToday()
Moves the calendar to today's date.
- Parameters: None
- Returns: None (
void)
Example
calendarID.goToToday();
expand()
Expands the calendar to the full month view.
- Parameters: None
- Returns: None (
void)
Example
calendarID.expand();
collapse()
Collapses the calendar to the week view.
collapse() is a deprecated method — we no longer recommend it. That's also why it appears with a strikethrough in the script autocomplete list in Lucy Studio. It still works today and switches to the week view, but a later version may remove it. To control whether the calendar shows a month or a week, use the widget's calendarFormat property (month/week) instead.
- Parameters: None
- Returns: None (
void)
Example
calendarID.collapse();
Event
onPageChanged
Runs when the visible month (page) changes. Assign a callback function to define what happens.
- Kind: Event
- Handler:
(date) => { ... }-dateis the reference date of the newly shown page (yyyyMMddformat) - Returns: None
Example
calendarID.onPageChanged = (date) => {
// Code to run when the page (month) changes
};
onDateSelected
Runs when someone selects a date. Assign a callback function to define what happens.
- Kind: Event
- Handler:
(date) => { ... }-dateis the selected date (yyyyMMddformat) - Returns: None
Example
calendarID.onDateSelected = (date) => {
// Code to run when a date is selected
};
Common Widget Control (all widgets)
Every widget can use name-based common Widget Control (Method) such as setProperty / getProperty / setStyleProperty. See the common reference doc (to be written).