I'm using .netcore 5, Syncfusion blazor server side v 18.4.0.31.
SfDateRangePicker works fine with desktop screen resolution, but in mobile and tablet resolution the whole thing crashes.
Below is the error I get :
Error: System.NullReferenceException: Object reference not set to an instance of an object. at Syncfusion.Blazor.Calendars.SfDateRangePicker`1.BindRenderDayEvent(RenderDayCellEventArgs eventArgs) at Syncfusion.Blazor.Calendars.Internal.CalendarDayCell`1.triggerDayCellEvent() at Syncfusion.Blazor.Calendars.Internal.CalendarDayCell`1.renderDayCell(DateTime currentDate, TCalendarCell dateValue, Boolean multiSelection, DateTime[] values) at Syncfusion.Blazor.Calendars.Internal.CalendarDayCell`1.renderCell(DateTime currentDate, TCalendarCell dateValue, Boolean multiSelection, DateTime[] values, CalendarView calendarView) at Syncfusion.Blazor.Calendars.Internal.CalendarDayCell`1.OnInitializedAsync() at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
Code snippet :
<sfdaterangepicker id="Calender" cssclass="CalenderCss" tvalue="DateTime?" @bind-startdate="@Fromdate" @bind-enddate="@Todate" strictmode="true" max="@MaxDate" width="58%" placeholder="Choose From and To dates">
</sfdaterangepicker>
@code {
public DateTime? Fromdate { get; set; }
public DateTime? Todate { get; set; }
public DateTime MaxDate { get; set; }
protected override async Task OnInitializedAsync()
{
Todate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
Fromdate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
MaxDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
//Todate = DateTime.Today; //Fromdate = DateTime.Today.AddDays(-2); //MaxDate = DateTime.Today;
await Task.Yield();
await LoadreportData();
}
protected async Task LoadreportData()
{
VisibleProperty = true;
Spinnercaption = "Loading Data...";
BoolAllowFilter = false;
objreportprocesser.Fromdate = Fromdate;
objreportprocesser.Todate = Todate;
StateHasChanged();
Spinnercaption = "";
}
}
Attachment: Reports_1f79ab24.rar
Hi Berly Christopher,
I'm getting below error on changing the version from 18.4.0.31 to 18.4.0.35
Failed to load resource: the server responded with a status of 404 ()
blazor.server.js:19 [2021-08-10T06:21:24.460Z] Error: Microsoft.JSInterop.JSException: Failed to fetch dynamically imported module: https://localhost:5001/_content/Syncfusion.Blazor/scripts/sf-spinner-87be8b.min.js
TypeError: Failed to fetch dynamically imported module: https://localhost:5001/_content/Syncfusion.Blazor/scripts/sf-spinner-87be8b.min.js
at Microsoft.JSInterop.JSRuntime.InvokeWithDefaultCancellation[T](String identifier, Object[] args)
at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
at Syncfusion.Blazor.Internal.SfBaseUtils.ImportModule(IJSRuntime jsRuntime, SfScriptModules scriptModule, String hashKey)
at Syncfusion.Blazor.Internal.SfBaseUtils.ImportDependencies(IJSRuntime jsRuntime, List`1 dependentScripts, SfScriptModules scriptModules, String hashKey)
at Syncfusion.Blazor.ScriptDependencies.ImportScripts()
at Syncfusion.Blazor.SyncfusionBlazorService.UpdateSyncfusionService(Boolean isDevice)
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_0(Object state)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously(TaskCompletionSource`1 completion, SendOrPostCallback d, Object state)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<>c.<.cctor>b__23_0(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground(WorkItem item)
Hi Berly Christopher ,
Issue still persist. I have attached code example along with startup.cs file, kindly look at the same and revert to us.
Thankyou,
Varun D
Attachment: files_7b61baa2.rar