Release mode with full linker binding DateTime to CellTemplate not working

using the code below as described in the link day numbers are display in the monthview using debug mode but in release they arent appearing? where is this DateTime binding from? is it using System namespace? I use full linker, possibly linker strips it off but I have also used linker settings still doesnt work.


<scheduler:SfScheduler x:Name="Scheduler"

                        View="Month">

    <scheduler:SfScheduler.MonthView>

        <scheduler:SchedulerMonthView>

            <scheduler:SchedulerMonthView.CellTemplate>

                <DataTemplate>

                    <Grid Background = "MediumPurple">

                        <Label HorizontalTextAlignment="Center" TextColor="White" Text="{Binding DateTime.Day}"/>

                    </Grid>

                </DataTemplate>

            </scheduler:SchedulerMonthView.CellTemplate>

        </scheduler:SchedulerMonthView>

    </scheduler:SfScheduler.MonthView>

 </scheduler:SfScheduler>

<assembly fullname="System.Runtime">
<type fullname="System.DateTime" preserve="all"/>
</assembly>

1 Reply

VR Vallarasu Ravichandran Syncfusion Team November 3, 2025 08:16 AM UTC

Hi Emil,

Thank you for reaching out.

Since DateTime.Day is used only in data binding within the CellTemplate, the linker might remove it during release builds, causing the day numbers to disappear.

Each cell in the SchedulerMonthView uses SchedulerMonthCellDetails as its binding context, which includes the DateTime property. To resolve the issue, ensure the binding path correctly accesses DateTime.Day from this context. This will ensure the day numbers display correctly in both debug and release builds.

 

We’ve also shared sample and code snippets for your reference to assist with implementation.

<scheduler:SfScheduler x:Name="Scheduler"
                       View="Month">
      <scheduler:SfScheduler.MonthView>
          <scheduler:SchedulerMonthView>
              <scheduler:SchedulerMonthView.CellTemplate>
                  <DataTemplate>
                      <Grid Background = "MediumPurple" x:DataType="scheduler:SchedulerMonthCellDetails">
                          <Label HorizontalTextAlignment="Center" TextColor="White" Text="{Binding DateTime.Day}"/>
                      </Grid>
                  </DataTemplate>
              </scheduler:SchedulerMonthView.CellTemplate>
          </scheduler:SchedulerMonthView>
      </scheduler:SfScheduler.MonthView>
  </scheduler:SfScheduler>

Let us know if you need further assistance.

Regards,
Vallarasu R.



Attachment: SfSchedulerSample_50fa4a8a.zip

Loader.
Up arrow icon