Optionally allow for the disabling of Daylight Savings time detection when using the DateTime picker, or to set the TimeZone for the picker manually.
Hello, Christy,
The provided solution is related to mapping a DateTimeOffset value(this is C# related) to the DateTimePicker widget. The purpose of the DateTimeOffset is to define a date value based on UTC that is unrelated to any timezones. This in turn resolves the initial problem of having to deal with DST.
The JavaScript Date() object applies offset that corresponds to the user's timezone, this is not something that is explicitly related to the Kendo components.
However, we do provide several methods that allow you to manipulate the timezone offset that is applied to the dates. You can use the kendo.timezone.apply method to override the default timezone that is set by the Date object.
// This will return the current date and time in UTC+0
kendo.timezone.apply(new Date(), 0);
// This will return the current date and time in UTC+1
kendo.timezone.apply(new Date(), 60);
// This will return the current date and time in UTC+2
kendo.timezone.apply(new Date(), 120);
// And so on
You can allow the users to manually set a timezone using the above approach.
Best Regards,
Georgi Denchev
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
How the provided solution resolve the question asked?
Question was to force the KendoDateTimePicker to accept all date and time irrespective of the DST time even the DST time is applicable for the timezone.
Or allow the user to assign the timezone for the DateTimePicker and the date and time selected should be rendered as per the timezone overriding the system timezone.
Can you guys provide a solution for this?
Hi,
We have prepared an example illustrating how DateTimeOffset values can be handled.
Regards,
Viktor Tachev
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
Hi,
Would you have a look at this feedback item and share your thoughts whether a new binder for the DateTimeOffset type might solve this issue:
Regards,
Alex Hajigeorgieva
Progress Telerik
Kendo widgets use the JavaScript Date object which only displays dates and times in the timezone of the browser. Telerik's current advice is to shift the time to make it look like dates and times are displayed in the timezone of your choice. Besides being a pain to implement, this does not work during the spring daylight saving boundary where an hour of local time does not exist in the browser's timezone but does exist in the selected timezone. Currently the scheduler does not cope with this. https://dojo.telerik.com/oRuYu A better solution is needed.
Seems like the browser's datepicker applies local timezone but on postback C# doesn't process the timezone. Current advise from Telerik support is to manually calculate the offset and apply before posting the data and then handle it on response. This is tiresome for every datepicker. Would be great if the Datepicker has an inbuilt property that we can choose to either use UTC or Local timezone. And it would convert and return the value so we won't have to code it everywhere ourselves.
In addition to adding a TimeZone config property to kendoDateTimePicker, please add this to kendoTimPicker as well. I am dealing with this right now, and it appears that the code for these controls uses whatever the user's operating system is set to, which is not always what the application needs. We have TimeZone on the scheduler, so why not on these two as well?
bump