parameters to c1calendar popup function

Posted by: kevin.rowe on 12 October 2020, 3:16 am EST

  • Posted 12 October 2020, 3:16 am EST

    Here's the JS code I copied and modified from the example


    $(function () {
    $("#<%=dteSpecificDate.ClientID %>").click(function () {
    $("#<%=C1Calendar1.ClientID %>").c1calendar("popup", {
    of: $("#<%=dteSpecificDate.ClientID %>"),
    offset: '0 2'
    });
    })
    });


    I with my limited knowledge of JS can see it is creating an anonymous function to act as a click handler, that then creates a new calendar passing in parameters 'popup', and two named properties 'of' pointing back to the date dropdownfield and an offset that is just numbers in a string.

    it renders the calendar control, but tight against the datecontrol.

    I can't find any documentation for what these numbers are or what they do. It looks very similar to the JQuery popup calendar offset property.
    Where can I find an explanation of these parameters?
    What I actually want is the calendar positioned in the middle of the screen rather than relative to a control. Is this possible?
  • Replied 12 October 2020, 9:15 pm EST

    Hello Kevin,
    The popup method accepts the position for the C1Calendar to open as Popup which uses position from jquery. Please refer to the following documentation for the same:
    https://api.jqueryui.com/position/

    Regards,
    Manish Gupta
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels