This is a migrated thread and some comments may be shown as answers.

window.kendo.timezone.zones

5 Answers 204 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
leblanc
Top achievements
Rank 1
leblanc asked on 08 Apr 2015, 06:45 AM

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

Sort by
0
Vladimir Iliev
Telerik team
answered on 10 Apr 2015, 07:01 AM
Hi,

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
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
leblanc
Top achievements
Rank 1
answered on 10 Apr 2015, 07:24 AM

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.

 

 

 


0
Vladimir Iliev
Telerik team
answered on 10 Apr 2015, 08:31 AM
Hi,

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
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
leblanc
Top achievements
Rank 1
answered on 10 Apr 2015, 06:18 PM

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.

0
Georgi Krustev
Telerik team
answered on 14 Apr 2015, 10:15 AM
Hello leblanc,

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
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Scheduler
Asked by
leblanc
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
leblanc
Top achievements
Rank 1
Georgi Krustev
Telerik team
Share this question
or