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

Value of datetime pickers are different

1 Answer 72 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Winnie
Top achievements
Rank 1
Winnie asked on 04 Aug 2016, 08:45 AM

I have two input in the screen. Do you know why the format of values I get from this two input are different?

"orderDate": "2016-08-04T07:00:00.000Z",

"dueDate": "2016-08-15T2:00:00.000+10:00",

 

<input autocomplete="off" kendo-date-time-picker="" k-options="ngDateTimeOptions" data-qtype="datetime" k-format="'g'" k-parse-formats="'yyyy-MM-ddTH:mm:ss.fffzzz'" id="OrderDateAutoField" name="orderDate" ng-blur="ngBlur($event);" ng-focus="ngfocus($event);" k-ng-model="ngData.salesOrderHeaders[0].orderDate" required="" tabindex="1505" focusableobjectuid="viewfield_e7b20a53cc5546bbb7ef94571005aab6" data-role="datetimepicker" type="text" class="k-input" role="combobox" aria-expanded="false" aria-disabled="false" aria-readonly="false" style="width: 100%;">

<input autocomplete="off" kendo-date-time-picker="" k-options="ngDateTimeOptions" data-qtype="datetime" k-format="'g'" k-parse-formats="'yyyy-MM-ddTH:mm:ss.fffzzz'" id="DueDateAutoField" name="dueDate" ng-blur="ngBlur($event);" ng-focus="ngfocus($event);" k-ng-model="ngData.salesOrderHeaders[0].dueDate" tabindex="1506" focusableobjectuid="viewfield_9cf644d0913e49c4a7a374349f94e2a6" data-role="datetimepicker" type="text" class="k-input" role="combobox" aria-expanded="false" aria-disabled="false" aria-readonly="false" style="width: 100%;" aria-activedescendant="aa5d221d-3ca9-491e-8655-46f52119e200_cell_selected">

Thanks

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 08 Aug 2016, 08:10 AM
Hello Winnie,

The both values use ISO8601 standard format, but the first one is serialized in UTC timezone (Z symbol):

https://en.wikipedia.org/wiki/ISO_8601

You will need to check how the values are serialiezd and whether the first one uses UTC date kind. Basically, the serialization is done on the server and most probably the widget is not related to that implementation.

If the problem still persists, please provide more details about the current implementation. A runnable demo would be of a great help.

Regards,
Georgi Krustev
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Date/Time Pickers
Asked by
Winnie
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or