@namespace AntDesign.Internal @typeparam TValue @inherits DatePickerPanelBase @using AntDesign
@if (IsShowHeader) { @RenderPickerHeader }
@RenderTableHeader @{ var startDate = ViewStartDate; bool shouldStopRender = false; } @for (int row = 1; row <= MaxRow; row++) { if (shouldStopRender) { break; } var startColDate = startDate; @RenderFisrtCol?.Invoke(startColDate) @for (int col = 1; col <= MaxCol; col++) { if (shouldStopRender) { break; } var currentColDate = startDate; string cellCls = GetCellCls(currentColDate); string innerCellCls = GetInnerCellCls(currentColDate); startDate = @GetNextColValue(currentColDate); if (ShouldStopRenderDate(currentColDate, startDate)) { shouldStopRender = true; } } @{ var endColDate = startDate;} @RenderLastCol?.Invoke(endColDate) }
@if (IsCalendar) {
@if (Picker == DatePickerType.Date && DateRender != null) { @(DateRender(currentColDate, DatePicker.CurrentDate)) } else if (Picker == DatePickerType.Month && MonthCellRender != null) { @(MonthCellRender(currentColDate)) } else { @RenderColValue(currentColDate) }
@if (Picker == DatePickerType.Date && CalendarDateRender != null) { @(CalendarDateRender(currentColDate)) } else if (Picker == DatePickerType.Month && CalendarMonthCellRender != null) { @(CalendarMonthCellRender(currentColDate)) }
} else { @if (Picker == DatePickerType.Date && DateRender != null) { @(DateRender(currentColDate, DatePicker.CurrentDate)) } else if (Picker == DatePickerType.Month && MonthCellRender != null) { @(MonthCellRender(currentColDate)) } else { @RenderColValue(currentColDate) } }