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
| Field | Vai trò |
|---|---|
FieldName | Property của entity (DateTime? đại diện đầu tháng). |
FormatData | Format hiển thị, dạng "{0:format}". Vd "{0:MM/yyyy}", "{0:MMM yyyy}". |
Label | Text label. |
ShowLabel | True → render <label> cạnh widget. |
DataSourceFilter | OData filter ?$filter=... để giới hạn list tháng (rare). |
FormatEntity | Format toàn bộ entity (template). |
PlainText | True → render plain khi readonly. |
AutoFit | True → co giãn theo nội dung. |
ChildStyle | Inline CSS style apply lên element con. |
Events kích hoạt
| Event | Method signature |
|---|---|
change | (entity, value, this) |
value là DateTime? đầ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".