We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Why choose DateTime?

Thread ID:





148306 Oct 15,2019 02:23 AM UTC Oct 15,2019 12:35 PM UTC Blazor 1
Tags: DateTime Picker
Asked On October 15, 2019 02:23 AM UTC

Why use DateTime instead of DateTimeOffset?

Sureshkumar P [Syncfusion]
Replied On October 15, 2019 12:35 PM UTC

Hi Patrick, 

Greetings from Syncfusion support. 

We have not processed the value based on timezone (DateTimeOffset) value in our source end, so we have used DateTime instead of DateTimeOffset. But, you can convert Datetimeoffset value to DateTime and assign the value to our Datetimepicker component. 

Kindly refer to the code block. 

@using Syncfusion.EJ2.Blazor.Calendars; 
<EjsDateTimePicker Value="@DateTimeValue"></EjsDateTimePicker> 
@code { 
    public DateTimeOffset Value { get; set; } = new DateTimeOffset(2008, 6, 19, 7, 0, 0, new TimeSpan(5, 30, 0)); 
    public DateTime DateTimeValue 
            return Value.UtcDateTime; 
            DateTimeValue = Value.UtcDateTime; 

We have created a sample based on your requirement. please find the sample here: https://www.syncfusion.com/downloads/support/forum/148306/ze/DateTimePicker162707203  

Sureshkumar P 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon