jQWidgets Forums

jQuery UI Widgets Forums Editors DateTimeInput auto subtracting hours

This topic contains 3 replies, has 2 voices, and was last updated by  ryan paul 11 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • auto subtracting hours #22854

    ryan paul
    Participant

    hi everyone,

    i have a jqxDateTimeInput,

    var date1 = $(‘#DateAcquiredTextBox’).jqxDateTimeInput(‘getDate’);
    var date2 = $(‘#RetiredDateTextBox’).jqxDateTimeInput(‘getDate’);
    var date3 = $(‘#DisposedDateTextBox’).jqxDateTimeInput(‘getDate’);

    when i set the value like 01/01/1900 i get ‘1899-12-31T16:00:00.000Z’
    when i set the value like 01/02/1900 i get ‘1900-01-01T16:00:00.000Z’
    when i set the value like 01/03/1900 i get ‘1900-01-02T16:00:00.000Z’

    please help.

    thanks,
    ryan paul

    auto subtracting hours #22855

    ryan paul
    Participant

    this also happens when i used datetime in the grid

    regards,
    ryan paul

    auto subtracting hours #22857

    Dimitar
    Participant

    Hello ryan paul,

    Please make sure you are using the latest version of jQWidgets (2.8.3). With it, we were not able to reproduce the reported issue by testing with the following example:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="../../scripts/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="../../scripts/gettheme.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxdatetimeinput.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcalendar.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxtooltip.js"></script>
    <script type="text/javascript" src="../../jqwidgets/globalization/globalize.js"></script>
    </head>
    <body>
    <div id='content'>
    <script type="text/javascript">
    $(document).ready(function () {
    var theme = getDemoTheme();
    $("#jqxWidget").jqxDateTimeInput({ width: '250px', height: '25px', theme: theme });
    $("#getDate").click(function () {
    var getDate = $('#jqxWidget').jqxDateTimeInput('getDate');
    alert(getDate);
    });
    });
    </script>
    <button id="getDate">
    Get date</button>
    <div id='jqxWidget'>
    </div>
    </div>
    </body>
    </html>

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    auto subtracting hours #22863

    ryan paul
    Participant

    i tried using 2.8.3 but it’s the same,

    i tried to displayed it using

    var getDate = $(‘#jqxWidget’).jqxDateTimeInput(‘getDate’);
    alert(getDate);

    and it get the correct data.
    but i notice that the problem occur when i used the JSON.stringify;

    regards,
    ryan paul

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.