jQWidgets Forums

jQuery UI Widgets Forums Editors DateTimeInput Problem formatting values as a military date time group

Tagged: 

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

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

  • THawk
    Participant

    I am trying to format a date-time value as a military date time group. An example is ‘280900Z Apr 2015’. The ‘Z’ is a military time code letter. Valid values include: A, B, C, D, E, F, G, H, I, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z.

    I have no problem formatting the year, month, date, hours, and minutes. My problem arises when I try to use the ‘M’ time code letter. The M is being interpreted as the number of the month rather than as an ‘M’. What I want is ‘280900M Apr 2015’, but what I get is ‘2809004 Apr 2015’.

    In my app the user selects a time code letter from another widget which I then use to update the DateTimeInput format string. Here is the code I use to update the format string

    			$('#startTimeInput').jqxDateTimeInput({
    				formatString : "ddHHmm" + timeCodeLetter + " MMM yyyy"
    			});

    I have tried escaping the time code letter value and putting it inside single quotes, but neither solved the problem. How can I display the ‘M’ time code letter?

    In case it matters, I am using jqxAngular.

    Thanks for any help you provide.


    Peter Stoev
    Keymaster

    Hi THawk,

    M is a month in the formatting so it will be interpreted by jqxDateTimeInput as format string for month. There is no character escaping supported.

    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.