jQuery UI Widgets Forums Editors Calendar Settings the specialDates property with knockout

This topic contains 2 replies, has 2 voices, and was last updated by  VanCleef 9 years, 3 months ago.

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

  • VanCleef
    Participant

    Hello,

    I am currently working on a project where I combine a JqxCalendar with knockout but I ran into a problem.

    My html looks like this:

    <div data-bind="jqxCalendar: { width: '100%', height: 220, firstDayOfWeek: 1, selectionMode: 'range', culture: 'nl-NL', specialDates: testDate }"></div>

    Where testDate is a javascript variable:

    var testDate = new Date(2015, 10, 17);

    When I load the webpage my calendar does not have special dates. According to the API specialDates is a property.

    Can anyone tell me what is wrong?

    Thanks in advance.


    Vladimir
    Participant

    Hello VanCleef

    The specialDates parameter needs to be of type Array, and each element of the array must be a an object with the following fields: Date, Tooltip, Class
    example:

       var date = new Date(2015, 10, 17);
        specialDates: [{Date: date, Class: "", Tooltip: "my tooltip"}],
    

    Best Regards,
    Vladimir

    jQWidgets Team
    http://www.jqwidgets.com


    VanCleef
    Participant

    Hello Vladimir,

    Thank you for your help, this solved the problem!

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

You must be logged in to reply to this topic.