| Name | Value | Type | |
|---|---|---|---|
| Message | "Object reference not set to an instance of an object." | string |
Now I get these errors anytime I put a DatePicker control on a page and run it. Is it the DevExpress code? Do I need to keep them separate?
TIA,
The problem is in the CalendarEvents part:
<SfDatePicker TValue="DateTime" @bind-Value="@QuotationDate" PlaceHolder="Choose a Date" >
<CalendarEvents TValue="DateTime" OnRenderDayCell="onRenderDayCellHandler"></CalendarEvents>
</SfDatePicker>
If I exclude this, then it works.
Hi Miles,
We suggest you use “DatePickerEvents” instead of CalendarEvents in the DatePicker component to resolve the issue. Please refer to the below code snippet, sample, and documentation for more details.
<SfDatePicker TValue="DateTime" @bind-Value="@NewQuotation.QuotationDate" ShowClearButton="true" > <DatePickerEvents TValue="DateTime" OnRenderDayCell="onRenderDayCellHandler"></DatePickerEvents> </SfDatePicker> |
Please contact us if you require any further assistance on this.
Regards,
Udhaya Kumar D
Ok, I will try that. You may want to update your documentation and sample source code then as well, that is where I got that from!
Cheers,
Miles
Hi Miles,
We can’t find the reported error in our documentation. If we missed we request you to share the error documentation link.
Please find the DatePicker Event documentation and API documentation below for reference.
Documentation : DatePicker Evnet - API
Regards,
Udhaya Kumar D.
Hi Miles,
The share documentation is about the Syncfusion calendar component. The DatePicker is a separate component and please find the documentation for DatePicker.
Links : Getting-Started - Special Dates-Online Demo
Regards,
Udhaya Kumar D.
Got it, thanks! Do you have any code for determining stat holidays? For a future version, having this ability would be fantastic, but I am writing my own right now. I will share when finished.
Cheers,
Miles
Hi Miles,
As we mentioned earlier you can customize the UI appearance of the date cell using RenderDayCell event and CSS stylings. If this does not meets your requirement kindly share the elaborated information about your requirement.
Regards,
Udhaya Kumar D.