jQWidgets Forums

jQuery UI Widgets Forums Editors DateTimeInput format string problem

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 10 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • format string problem #57725

    mustafa
    Participant

    hello
    my string date

    Database from date = “30/07/2014”; dd/MM/yyyy

    $('#ActiveContractStartDate').jqxDateTimeInput('setDate',"07,30,2014"); // page output successfully = 30/07/2014

    But this does not happen

    $('#ActiveContractStartDate').jqxDateTimeInput('setDate',"30,07,2014"); // page output Unrelated a date = 07/06/2016

    I tried this, but it did not improve

    $("#ActiveContractStartDate").jqxDateTimeInput({formatString:"dd/MM/yyyy", width: '250px', height: '34px'});

    $(‘#ActiveContractStartDate’).jqxDateTimeInput(‘setDate’,”30,07,2014″); or

    $(‘#ActiveContractStartDate’).jqxDateTimeInput(‘setDate’,”30/07/2014″);`

    and agein age output Unrelated a date = 07/06/2016

    How can I enter in this format? “30/07/2014”;

    format string problem #57728

    Peter Stoev
    Keymaster

    Hi mustafa,

    The jqxDateTimeInput is a Javascript widget and as such it works with JavaScript Date objects. This means that you have to pass a JavaScript Date object when you call setDate or at least a correct String which can be parsed by the JavaScript Date object’s Parse function. To learn more about the Date object, see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date and http://www.w3schools.com/jsref/jsref_obj_date.asp.

    Best Regards,
    Peter Stoev

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

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

You must be logged in to reply to this topic.