Core Docs

MonthBox

Picker tháng/năm — bind `DateTime?`. Đơn giản hơn `Datepicker` khi chỉ cần granularity tháng.

Source: Core/Components/MonthBox.cs · ComType: MonthBox

Cấu hình

ComType:    MonthBox
FieldName:  PeriodMonth
Label:      Tháng
ShowLabel:  true
FormatData: "{0:MM/yyyy}"

Field DB dùng

FieldVai trò
FieldNameProperty của entity (DateTime? đại diện đầu tháng).
FormatDataFormat hiển thị, dạng "{0:format}". Vd "{0:MM/yyyy}", "{0:MMM yyyy}".
LabelText label.
ShowLabelTrue → render <label> cạnh widget.
DataSourceFilterOData filter ?$filter=... để giới hạn list tháng (rare).
FormatEntityFormat toàn bộ entity (template).
PlainTextTrue → render plain khi readonly.
AutoFitTrue → co giãn theo nội dung.
ChildStyleInline CSS style apply lên element con.

Events kích hoạt

EventMethod signature
change(entity, value, this)

valueDateTime? đầu tháng (vd 2026-03-01).

Tip

  • Dùng cho báo cáo theo tháng / kỳ kế toán.
  • Hiển thị format "MM/yyyy" hoặc "MMM yyyy".

Core Docs · Astro · Core.API/wwwRoot/docs