Hi Marco Ortali,
Thank you for reaching out us. By default, the preselected date
value will be processed based on the system's local time zone. The 'serverTimezoneOffset'
is independent of the client machine. The value of the 'serverTimezoneOffset'
property pertains to the server machine (where the application is hosted). For
instance, if your application is hosted in the US, you should set the
'serverTimezoneOffset' property to the value '-4' as a string. The 'serverTimezoneOffset'
property is intended to enable the component to render based on your updated
server time zone property. This restriction will help ensure that the preselected
date is initially converted based on the local time zone.
We wish to inform
you that if you provide any preselected values, they will be converted based on
the provided timeZone offset. However, please note that the 'ServerTimeZoneOffset'
property functions only in the initial scenario and does not update dynamically
when a value is selected.
Code Snippet:
|
<SfDatePicker Placeholder="Select a date and time" TValue="DateTime?" @bind-Value="@DateValue3" ServerTimezoneOffset="-4"></SfDatePicker>
@code {
private DateTime? DateValue3 = DateTime.Now;
}
|
Regards,
Yohapuja
S