jQWidgets Forums

jQuery UI Widgets Forums Editors DateTimeInput BUG: jqxDateTimeInput ignores format when TYPING

This topic contains 4 replies, has 4 voices, and was last updated by  robf 1 year ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author

  • pk
    Participant

    The default format for jqxDateTimeInput, as per the documentation, is dd/mm/yyyy. However, this format is ignored if the user TYPES inside the jqxdatetimeinput, when editmode is set to full.
    Fiddle: http://jsfiddle.net/xg5hqe0n/

    This doesn’t occur if the user pastes a valid value, or if the user selects a value from the calendar popup.

    Hi,

    Thank you for reporting this, I have opened a work item.
    Meanwhile, if we can help you with something else, do not hesitate to ask!

    Best regards,
    Svetoslav Borislavov

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


    robf
    Participant

    Hello,
    I have run into the same/similar issue when using the jqxDateTimeInput.

    I am using JQW v17.0.1.

    I have two fields on a form – #fromDate and #toDate. Both get initialized to today’s date. User can change.

    
    const dateProps = {width: 140,
    		height: 30,
    		formatString: 'MM/dd/yyyy',
    		showFooter: true,
    		allowNullDate: false
    		}
    
    $("#fromDate").jqxDateTimeInput(dateProps);
    $("#toDate").jqxDateTimeInput(dateProps);
    

    When I select a date from the pop-up it works fine. If I paste a date into the input field it pastes properly.

    However, when I type directly into the date input field it just ZEROES out the field and then I end up with 01/01/1900

    This occurs on both input fields.

    I have followed the example but am lost as to why this might happen. Is there anything wrong with my initialization?

    Thanks for your help.
    Rob


    admin
    Keymaster

    Hi Rob,

    Check whether all required files are included. This sounds like globalize.js is not there.

    Regards,
    Peter
    jQWidgets Team
    https://www.jqwidgets.com/


    robf
    Participant

    Hi Peter,

    Adding “../../jqwidgets/globalization/globalize.js” worked for me.

    Thank you. Very much appreciated!

    Rob

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

You must be logged in to reply to this topic.