I am trying to set the default timezone (StartTimezone and EndTimezone) manually and was hoping to avoid pulling down another 3rd party library to do this.
"Automatic Timezone Detection Using JavaScript" http://pellepim.bitbucket.org/jstz/
Is there anyway to achieve this with window.kendo.timezone.zones and getTimezoneOffset() ?
5 Answers, 1 is accepted
Currently Kendo UI doesn't support automatic detection of the user timezone, however you can share your idea at Kendo UI UserVoice to allow other users vote for it. Most voted ideas are included in next Kendo UI releases.
Regards,
Vladimir Iliev
Telerik
Your docs state I need to specify a timezone when an event is persisted.
http://docs.telerik.com/kendo-ui/api/javascript/ui/scheduler#configuration-timezone
If the user selects a timezone from the kendo-timezone-editor e.g. "America/New_York" how would I convert a kendo date picker value to"Etc/UTC".
kendo.timezone.convert(datePickerValue, "America/New_York", "Etc/UTC") ?
I want to normalize all my dates to UTC before save. This would also avoid having to pull down another 3rd party library to detect timezone.
If the kendo-timezone-editor has "No timezone" specified how can I convert datePickerValue to UTC time? We are assuming the datePickerValue is represented in local time.
I'm not sure that I understand correctly what exactly you are trying to achieve - if you just need to send UTC dates to the server than please note that this is already done by default by the scheduler. It expects to receive and sends only UTC dates.
Regards,
Vladimir Iliev
Telerik
I am currently hijacking the edit form event and persisting it out of band of the schedular and have to handle the required "save" logic myself.
In general, the DatePicker widget uses only the timezone of the browser, as it works with JavaScript Date object that always is in the browser timezone. If you would like to convert its value to UTC timezone then you should do that manually.
With regards to the event start/end timezone, the event start/end time will be converted to the scheduler timezone, because the widget always keeps the events in the scheduler timezone.
Let me know if I can be of a further assistance or I am missing something.
Regards,
Georgi Krustev
Telerik