Value of datetime pickers are different

2 posts, 0 answers
  1. Winnie
    Winnie avatar
    7 posts
    Member since:
    Sep 2014

    Posted 04 Aug Link to this post

    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
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 08 Aug Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
Back to Top