jQuery UI Widgets Forums Editors Calendar titleFormat does not work as expected

This topic contains 2 replies, has 2 voices, and was last updated by  Hop 11 years ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • titleFormat does not work as expected #45691

    Hop
    Participant

    I went to the API for the jqxCalendar and expanded the titleFormat property. I copied the example (titleFormat portion) and added it to my code. I expected to see the same results as the default for this property, but instead, I got the full month name followed by today’s day date. IE: “November 30”. I tried other combinations used in the expanded info under the property in the API and got back a blank line and loss of control moving forward and back through the months.

    Here is what I have for initializing the calendar widget.
    $("#"+record.name).jqxCalendar({titleFormat: "MMMM yyyy", showWeekNumbers: true, enableWeekend: true, navigationDelay:200, width: 500, height:500});

    I am trying to change the title to a format “yyyy-MM-dd”. That’s when the title went blank and I lost calendar navigation control.

    Thank you for your time!

    titleFormat does not work as expected #45702

    Peter Stoev
    Keymaster

    Hi Hop,

    The property should be set to an array of formats.

    Ex: [“MMMM yyyy”, “yyyy”, “yyyy”, “yyyy”]

    Best Regards,
    Peter Stoev

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

    titleFormat does not work as expected #45720

    Hop
    Participant

    Ok Peter, thank you. That fixed it. But I still do not know why. The example doesn’t show your solution so I do not know what the elements in the array refer to. I just changed the first element to be “yyyy-MM-dd” and left the other three elements the same as you shown in your example.
    $("#"+record.name).jqxCalendar({ titleFormat: ["yyyy-MM-dd", "yyyy", "yyyy", "yyyy"], showWeekNumbers: true, enableWeekend: true, navigationDelay:200, width: 500, height:500});
    That gives me what I wanted though. My curiosity is all I need solved at this point.

    Thank you for your time and reply!

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

You must be logged in to reply to this topic.